Skip to content
Snippets Groups Projects
Commit b97643e1 authored by Vincent Mazenod's avatar Vincent Mazenod
Browse files

Add docker file

parent c07d7aab
No related branches found
No related tags found
No related merge requests found
Pipeline #8004 skipped
FROM python:3.7-slim AS compile-image
ARG DEBIAN_FRONTEND=noninteractive
RUN { \
echo krb5-config krb5-config/default_realm string 'LOCAL.ISIMA.FR'; \
echo tzdata tzdata/Areas string 'Etc'; \
echo tzdata tzdata/Zones/Etc string 'UTC'; \
} | debconf-set-selections \
&& \
apt-get update && apt-get install -y --no-install-recommends \
build-essential \
gcc \
apt-utils \
krb5-user \
locales \
rsync \
&& \
locale-gen fr_FR \
locale-gen fr_FR.UTF-8 \
update-locale LANG=fr_FR.UTF-8 \
. /etc/default/locale
COPY requirements.txt .
RUN pip install --user -r requirements.txt
FROM python:3.7-slim AS build-image
COPY --from=compile-image /root/.local /root/.local
COPY --from=compile-image /usr/bin /usr/bin
COPY --from=compile-image /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu
LABEL stage=builder
ENV SRV_DIR=//srv
ENV WORKING_DIR=//srv/pelican
ENV PORT=8000
ENV PATH=/root/.local/bin:$PATH
ADD . $SRV_DIR
WORKDIR $WORKING_DIR
RUN mkdir output content cache
VOLUME ["$WORKING_DIR/"]
# make python server in foreground
RUN sed -i 's/\$port &/\$port/g' $SRV_DIR/develop_server.sh
RUN chmod +x $SRV_DIR/develop_server.sh
EXPOSE $PORT
ENTRYPOINT $SRV_DIR/develop_server.sh start $PORT
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment