summaryrefslogtreecommitdiffstats
path: root/Dockerfile
blob: c87ddb57fe869e9e225b044a8aa80c50d0f5abd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM python:3.9.1-alpine3.12

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