-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (27 loc) · 857 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (27 loc) · 857 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
FROM python:3.13-alpine
RUN set -ex \
# Create a non-root user
&& addgroup --system --gid 1001 appgroup \
&& adduser --system --uid 1001 --no-create-home appuser -G appgroup \
# Upgrade the package index and install security upgrades
&& apk update \
&& apk upgrade \
&& apk --no-cache add ca-certificates \
&& rm -rf /var/cache/apk/*
WORKDIR /impresso-user-admin
ARG GIT_TAG
ARG GIT_BRANCH
ARG GIT_REVISION
RUN pip install -U pipenv
COPY Pipfile .
COPY Pipfile.lock .
RUN pipenv install --system --deploy --ignore-pipfile
COPY . .
RUN mkdir -p /impresso-user-admin/logs \
&& touch /impresso-user-admin/logs/debug.log \
&& chown -R appuser:appgroup /impresso-user-admin
ENV IMPRESSO_GIT_TAG=${GIT_TAG}
ENV IMPRESSO_GIT_BRANCH=${GIT_BRANCH}
ENV IMPRESSO_GIT_REVISION=${GIT_REVISION}
# Set the user to run the application
USER appuser