forked from Qiskit/qiskit_sphinx_theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (26 loc) · 971 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# This code is a Qiskit project.
#
# (C) Copyright IBM 2023.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.
# This Dockerfile is used to preview the docs in pull requests via GitHub Actions.
#
# To test it out locally:
#
# 1. ❯ docker build -t sphinx-docs-preview .
# 2. ❯ docker run --rm -p 8000:8000 -t sphinx-docs-preview
# 3. Open up localhost:8000
FROM python:3.9
RUN apt-get update && apt-get install -y pandoc graphviz
RUN python -m pip install -U tox
WORKDIR /app
COPY . .
RUN tox run -e docs
EXPOSE 8000
CMD ["python", "-m", "http.server", "-d", "example_docs/docs/_build"]