aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authormrichomme <morgan.richomme@orange.com>2020-05-12 15:24:49 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2020-05-18 13:47:57 +0000
commit3aadd714f1eae7f617127a23f5dd1e6513d3af77 (patch)
treef60b65bdd4281baecfbcc24bf17e828635261ba8 /Dockerfile
parent7c8b032d089cc0a77991595a23ab4ac8afd7ac10 (diff)
Create Dockerfile for python3 image7.0.0
Issue-ID: INT-1589 Signed-off-by: mrichomme <morgan.richomme@orange.com> Change-Id: I5cfe4c16380878737fe45cc8a2159a71a1f4912b Signed-off-by: mrichomme <morgan.richomme@orange.com>
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile22
1 files changed, 22 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..c49b78b
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,22 @@
+FROM python:3.8.2-alpine3.11
+
+LABEL maintainer="ONAP Integration team, morgan.richomme@orange.com"
+LABEL Description="Reference ONAP Python 3 image"
+
+ARG user=onap
+ARG group=onap
+
+# Create a group and user
+RUN addgroup -S $group && adduser -S -D -h /home/$user $user $group && \
+ chown -R $user:$group /home/$user && \
+ mkdir /var/log/$user && \
+ chown -R $user:$group /var/log/$user && \
+ mkdir /app && \
+ chown -R $user:$group /app
+
+# Tell docker that all future commands should be run as the onap user
+USER $user
+WORKDIR /app
+
+ONBUILD COPY requirements.txt .
+ONBUILD RUN pip install --no-cache-dir -r requirements.txt