-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (27 loc) · 828 Bytes
/
Dockerfile
File metadata and controls
39 lines (27 loc) · 828 Bytes
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.10-alpine AS builder
ENV PYTHONUNBUFFERED=1
RUN apk add --no-cache \
build-base \
libffi-dev \
git \
postgresql-dev
WORKDIR /install
# install private repo
RUN --mount=type=secret,id=github_token \
pip install --no-cache-dir --prefix=/install \
git+https://$(cat /run/secrets/github_token)@github.com/Space-DF/django-common-utils.git@dev
# install python requirements
COPY requirements.txt .
RUN pip install --no-cache-dir --prefix=/install -r requirements.txt
FROM python:3.10-alpine
ENV PYTHONUNBUFFERED=1
ENV DJANGO_SETTINGS_MODULE="device_service.settings"
RUN apk add --no-cache \
curl \
libffi \
postgresql-client
WORKDIR /app
COPY --from=builder /install /usr/local
COPY . .
RUN ["chmod", "+x", "./docker-entrypoint.sh"]
ENTRYPOINT ["./docker-entrypoint.sh"]