You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.0 KiB
45 lines
1.0 KiB
FROM alpine:3.6
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
COPY requirements /opt/app/requirements
|
|
|
|
RUN apk update && apk add --update --no-cache --progress \
|
|
make \
|
|
libpq \
|
|
nginx \
|
|
libmagic \
|
|
supervisor \
|
|
ghostscript \
|
|
zlib jpeg libpng freetype \
|
|
bash bash-completion && \
|
|
|
|
apk add --no-cache --virtual=.build-dependencies \
|
|
musl-dev \
|
|
build-base \
|
|
postgresql-dev \
|
|
ca-certificates \
|
|
openssl \
|
|
zlib-dev jpeg-dev libpng-dev freetype-dev \
|
|
python-dev && \
|
|
|
|
python -m ensurepip && \
|
|
rm -r /usr/lib/python*/ensurepip && \
|
|
pip install --upgrade pip setuptools && \
|
|
pip install --no-cache-dir -r /opt/app/requirements/production.txt && \
|
|
|
|
# Nginx
|
|
chown -R nginx:www-data /var/lib/nginx && \
|
|
|
|
# Delete build dependencies after use
|
|
apk del .build-dependencies && \
|
|
rm -r /root/.cache
|
|
|
|
COPY . /opt/app
|
|
VOLUME ["/opt/app/public/media"]
|
|
WORKDIR /opt/app
|
|
|
|
RUN rm -v /etc/nginx/nginx.conf
|
|
ADD /conf/nginx.conf /etc/nginx/
|
|
|
|
EXPOSE 80
|
|
CMD ["conf/docker/entrypoint_production.sh"]
|
|
|