X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=near-rt-ric-simulator%2FDockerfile;h=a2ab6ab888bc7a788f397e81902de7dd741ef1df;hb=refs%2Fheads%2Ff-release;hp=05a75fd1e3dfbcd95258f5f4b24dd11be62071de;hpb=9ab67f5d44b9e5bfcafddd6ea5e0ae10f68ca110;p=sim%2Fa1-interface.git diff --git a/near-rt-ric-simulator/Dockerfile b/near-rt-ric-simulator/Dockerfile index 05a75fd..a2ab6ab 100644 --- a/near-rt-ric-simulator/Dockerfile +++ b/near-rt-ric-simulator/Dockerfile @@ -1,5 +1,5 @@ # ============LICENSE_START=============================================== -# Copyright (C) 2020 Nordix Foundation. All rights reserved. +# 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. @@ -17,20 +17,31 @@ FROM python:3.8-slim-buster -WORKDIR /usr/src/app - RUN pip install connexion[swagger-ui] -#install nginx -RUN apt-get update -RUN apt-get install -y nginx=1.14.* +#install nginx and curl +RUN apt-get update && apt-get install -y nginx=1.14.* nginx-extras curl -#install curl -RUN apt-get install -y curl +WORKDIR /usr/src/app -COPY src src COPY api api COPY nginx.conf nginx.conf +COPY certificate /usr/src/app/cert +COPY src src + +ARG user=nonrtric +ARG group=nonrtric + +RUN groupadd $user && \ + useradd -r -g $group $user +RUN chown -R $user:$group /usr/src/app +RUN chown -R $user:$group /var/log/nginx +RUN chown -R $user:$group /var/lib/nginx +RUN chown -R $user:$group /etc/nginx/conf.d +RUN touch /var/run/nginx.pid +RUN chown -R $user:$group /var/run/nginx.pid + +USER ${user} RUN chmod +x src/start.sh CMD src/start.sh ${A1_VERSION}