Skip to content

Commit

Permalink
use alpine for a lighter container
Browse files Browse the repository at this point in the history
  • Loading branch information
RouxRC committed Jul 25, 2019
1 parent 528de58 commit c333967
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
FROM python:2.7
FROM python:2.7-alpine

WORKDIR /app

ENV PYTHONPATH $PYTHONPATH:/app

COPY requirements.txt /app/requirements.txt

RUN apt-get update \
&& apt-get install curl git vim python-dev python-pip libxml2-dev libfreetype6-dev libpng-dev libxslt1-dev libffi-dev mongodb -y --no-install-recommends \
RUN apk --update add build-base gfortran pkgconfig python-dev openblas-dev freetype-dev libpng-dev libxml2-dev libxslt-dev libffi-dev openssl-dev mongodb \
&& ln -s /usr/include/locale.h /usr/include/xlocale.h \
&& pip install --cache-dir=/tmp/pipcache --upgrade setuptools pip \
&& pip install --cache-dir=/tmp/pipcache numpy==1.7.1 \
&& pip install --cache-dir=/tmp/pipcache matplotlib==1.3.0 pystache==0.5.3 Wand==0.4.4 \
&& pip install --cache-dir=/tmp/pipcache matplotlib==1.5.3 pystache==0.5.3 Wand==0.4.4 \
&& pip install --cache-dir=/tmp/pipcache --requirement /app/requirements.txt \
&& rm -r /tmp/pipcache \
&& apt-get autoclean \
&& rm -r /var/cache/apt/*
&& apk del build-base gfortran pkgconfig \
&& rm -r /var/cache/apk/*

COPY ./bin /app/bin

Expand All @@ -34,4 +34,4 @@ RUN mkdir -p /root/.config/matplotlib && echo "backend : Agg" > /root/.config/ma

VOLUME ["/app/web"]

ENTRYPOINT ["/app/docker-entrypoint.sh"]
ENTRYPOINT ["sh", "/app/docker-entrypoint.sh"]
2 changes: 1 addition & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ fi

cd /app

bash bin/configureDB-mongo3.sh
sh bin/configureDB-mongo3.sh

twistd -noy gazouilleur/bot.py -l -

0 comments on commit c333967

Please sign in to comment.