X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=scriptversion%2Fapp%2FDockerfile;fp=scriptversion%2Fapp%2FDockerfile;h=21b24b17fcc327c1b9ded789574c23d88e3a445b;hb=c78feeaed2f5889816e938328646397ae0e18c71;hp=0000000000000000000000000000000000000000;hpb=46a6d054a6efcae4d249efe79a13bccb1b0252fc;p=nonrtric%2Frapp%2Forufhrecovery.git diff --git a/scriptversion/app/Dockerfile b/scriptversion/app/Dockerfile new file mode 100644 index 0000000..21b24b1 --- /dev/null +++ b/scriptversion/app/Dockerfile @@ -0,0 +1,41 @@ +# ============LICENSE_START=============================================== +# Copyright (C) 2021 Nordix Foundation. All rights reserved. +# ======================================================================== +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END================================================= +# + + +FROM python:3.8-slim-buster + +COPY . /usr/src/app/ + +WORKDIR /usr/src/app + +## install curl & ping to help debug +RUN apt update +RUN apt install curl -y +RUN apt-get install iputils-ping -y + +RUN pip install -r requirements.txt + +ARG user=nonrtric +ARG group=nonrtric + +RUN groupadd $user && \ + useradd -r -g $group $user +RUN chown -R $user:$group /usr/src/app/ + +USER ${user} + +CMD [ "python3", "-u", "main.py" ]