Browse Source

Rely on debian-stretch image

master
Felix Delattre 4 years ago
parent
commit
f59fbb42ac
  1. 37
      Dockerfile
  2. 0
      files/requirements.txt
  3. 0
      files/start.sh

37
Dockerfile

@ -1,16 +1,29 @@ @@ -1,16 +1,29 @@
FROM python:2
FROM debian:stretch-slim
ENV SRV_DIR=//srv
ENV WORKING_DIR=//srv/pelican
ENV PORT=8000
ADD ./files $SRV_DIR
WORKDIR $WORKING_DIR
RUN mkdir output content cache
VOLUME ["$WORKING_DIR/"]
# Install dependencies
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update --yes --fix-missing && apt-get upgrade --yes && \
apt-get install --yes --no-install-recommends \
apt-utils \
bash \
coreutils \
python-pip \
python-virtualenv \
python-dev \
python-setuptools
# Install pelican and dependencies
COPY files/start.sh /start.sh
COPY files/requirements.txt requirements.txt
RUN pip install wheel
RUN pip install -r requirements.txt
RUN chmod +x $SRV_DIR/develop_server.sh
EXPOSE $PORT
CMD $SRV_DIR/develop_server.sh restart $PORT
# Cleanup
RUN apt-get autoremove --yes $build_dependencies && apt-get autoremove --yes && \
apt-get clean --yes && rm -rf /var/lib/apt/* /var/cache/apt/* /root/.cache
EXPOSE 8000
WORKDIR /srv/pelican
VOLUME ["/srv/pelican"]
CMD /start.sh restart 8000

0
files/pelican/requirements.txt → files/requirements.txt

0
files/develop_server.sh → files/start.sh