-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (30 loc) · 1.17 KB
/
Dockerfile
File metadata and controls
35 lines (30 loc) · 1.17 KB
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
34
35
FROM python:3.12-slim AS python
WORKDIR /python
COPY --chown=app:app ./requirements.txt /python/requirements.txt
RUN pip install -r requirements.txt
RUN ipython kernel install --user --name=pythonic_misadventures
# Build the documentation
# Use the official Python 3.12 image as the base image
FROM python AS build
WORKDIR /app
COPY --chown=app:app ./book /app/book
RUN jupyter-book build book --path-output=/_build
RUN touch /_build/_build/html/.nojekyll
RUN touch /_build/_build/html/CNAME
RUN echo "pythonic-misadventures.nicobako.me" > /_build/_build/html/CNAME
# RUN touch ./_build/html/.nojekyll
# RUN touch ./_build/html/CNAME
# RUN echo "pythonic-misadventures.nicobako.me" > ./_build/html/CNAME
FROM nginx:alpine AS web-preview
WORKDIR /app
COPY --from=build --chown=app:app /_build/_build/html /usr/share/nginx/html/
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
# RUN jupyter-book build book # --warningiserror
# RUN rm -rf docs
# RUN mv book/_build/html/ docs
# RUN touch docs/.nojekyll
# RUN touch docs/CNAME
# RUN echo "pythonic-misadventures.nicobako.me" > docs/CNAME
# Specify the command to run the application
# CMD ["python", "-m", "jupyter", "notebook", "--port=5000" ]