personal-website/Dockerfile

31 lines
871 B
Docker
Raw Normal View History

2023-06-08 10:29:27 -04:00
FROM python:3.11-bullseye AS dev
ADD pip-requirements.txt /tmp/pip-requirements.txt
RUN pip install -r /tmp/pip-requirements.txt \
&& rm /tmp/pip-requirements.txt
# install drawio for doc diagram gen
ENV DRAWIO_VERSION "21.1.2"
RUN apt update \
&& apt install -yq --no-install-recommends \
xvfb \
wget \
libnotify4 \
libgbm1 \
libasound2 \
libxss1 \
libsecret-1-0 \
&& wget https://github.com/jgraph/drawio-desktop/releases/download/v${DRAWIO_VERSION}/drawio-amd64-${DRAWIO_VERSION}.deb \
&& apt install -y ./drawio-amd64-${DRAWIO_VERSION}.deb \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf drawio-amd64-${DRAWIO_VERSION}.deb
ENV XVFB_DISPLAY ":42"
2022-10-12 11:26:37 -04:00
2023-06-08 10:29:27 -04:00
FROM dev as prod
2021-07-24 15:29:34 -04:00
# Bundle app source
2023-06-08 11:12:32 -04:00
COPY . /website
WORKDIR /website
2021-07-24 15:29:34 -04:00
EXPOSE 8090
2023-06-14 20:16:47 -04:00
ENTRYPOINT [ "/bin/bash", "/website/container_serve.sh" ]