summaryrefslogtreecommitdiffstats
path: root/mod/onboardingapi/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'mod/onboardingapi/Dockerfile')
-rw-r--r--mod/onboardingapi/Dockerfile18
1 files changed, 12 insertions, 6 deletions
diff --git a/mod/onboardingapi/Dockerfile b/mod/onboardingapi/Dockerfile
index 606ca5b..2c3cd0d 100644
--- a/mod/onboardingapi/Dockerfile
+++ b/mod/onboardingapi/Dockerfile
@@ -1,12 +1,18 @@
FROM python:3.7-alpine
-RUN apk update && \
- apk add --virtual build-deps gcc python-dev musl-dev && \
- apk add postgresql-dev bash
+ARG UID=1000
+ARG GID=1000
+
COPY . /code
WORKDIR /code
-RUN pip install . \
- && mkdir -p ~/.config/dcae-cli
-EXPOSE 80
+RUN apk update && \
+ apk add --virtual build-deps gcc python-dev musl-dev && \
+ apk add postgresql-dev bash && \
+ addgroup -g $GID dcaemod && \
+ adduser -s /bin/bash -u $UID -G dcaemod -D dcaemod && \
+ pip install .
+
+EXPOSE 8080
+USER dcaemod
CMD /code/start.sh