Skip to content

Instantly share code, notes, and snippets.

@LuisQBlanco
Created May 2, 2020 19:09
Show Gist options
  • Save LuisQBlanco/868b4e7f3fa5ca9592c4553f8e64f92b to your computer and use it in GitHub Desktop.
Save LuisQBlanco/868b4e7f3fa5ca9592c4553f8e64f92b to your computer and use it in GitHub Desktop.
Dockerfile for python, django and postgrest project
FROM python:3.7-alpine
# MAINTAINER LuisQuinones
ENV PYTHONUNBUFFERED 1
# RUN mkdir billdjpostgtest
# COPY requirements.txt /billdjpostgtest/requirements.txt
COPY requirements.txt /billdjpostgtest1/
RUN apk update --no-cache
RUN apk add --update --no-cache postgresql-client
# This is necessary to install Pillow
# \
# jpeg-dev
RUN apk add --update --no-cache --virtual .tmp-build-deps \
gcc libc-dev linux-headers postgresql-dev
# This is necessary to install Pillow
# \
# musl-dev zlib \
# zlib-dev libjpeg
RUN pip install -r /billdjpostgtest1/requirements.txt
RUN apk update --no-cache
RUN apk del .tmp-build-deps
# RUN pip3 install -U pylint
# RUN mkdir /billdjpostg
WORKDIR /billdjpostgtest1
# COPY . /billdjpostgtest/
COPY ./app /billdjpostgtest1/
# RUN mkdir -p /vol/web/media
# RUN mkdir -p /vol/web/static
RUN adduser -D userlq
# RUN chown -R userlq:userlq /vol/
# RUN chmod -R 755 /vol/web
USER userlq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment