aboutsummaryrefslogtreecommitdiffstats
path: root/docker/app/stretch/3.6/Dockerfile
blob: 5f97a510ee4884fdf745484feddc903cf1a445c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM python:3.6-stretch

STOPSIGNAL SIGQUIT
ARG EXTRAS=deploy

RUN adduser \
    --disabled-login \
    --no-create-home \
    --uid 1500 \
    pysite

RUN apt-get update -y \
    && \
        apt-get install --no-install-recommends -y \
                gcc \
                libc-dev \
                libpq-dev \
    && \
        apt-get clean \
    && \
        rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY Pipfile /app/Pipfile
COPY Pipfile.lock /app/Pipfile.lock
RUN python3 -m pip install pipenv \
    && python3 -m pipenv install --dev --system --deploy

COPY . .

RUN python3 manage.py collectstatic --no-input --clear

RUN apt-get purge -y \
            gcc \
            libc-dev \
            libpq-dev

CMD ["uwsgi", "--ini", "docker/app/uwsgi.ini"]