diff options
author | Pawel <pawel.kasperkiewicz@nokia.com> | 2020-02-07 13:26:25 +0100 |
---|---|---|
committer | Pawel <pawel.kasperkiewicz@nokia.com> | 2020-02-07 14:42:24 +0100 |
commit | 9fce490595b068bac4fbd110fee78a4fa2407d91 (patch) | |
tree | 1e9b8add5e3a83f9d28fdd6ee2d643c39efaabcb /certService | |
parent | 4dd87396681cc8ad89256c6a329b51f14c113306 (diff) |
Dockerfile: CertService run as certService user
Issue-ID: AAF-995
Signed-off-by: Pawel <pawel.kasperkiewicz@nokia.com>
Change-Id: I53a4554524dd6266c9c8972dc5fa668f09b33ff2
Diffstat (limited to 'certService')
-rw-r--r-- | certService/Dockerfile | 10 | ||||
-rw-r--r-- | certService/README.md | 23 |
2 files changed, 31 insertions, 2 deletions
diff --git a/certService/Dockerfile b/certService/Dockerfile index b6a657a1..70617ede 100644 --- a/certService/Dockerfile +++ b/certService/Dockerfile @@ -2,6 +2,12 @@ FROM docker.io/openjdk:11-jre-slim ARG VERSION=0.0.1-SNAPSHOT -COPY target/cert-service-${VERSION}.jar ./app/cert-service.jar +RUN groupadd certService && useradd -g certService certService -ENTRYPOINT ["java","-jar","./app/cert-service.jar"] +RUN chown -R certService:certService /var/log + +USER certService:certService + +COPY target/cert-service-${VERSION}.jar ./opt/onap/aaf/certservice/cert-service.jar + +ENTRYPOINT ["java","-jar","./opt/onap/aaf/certservice/cert-service.jar"] diff --git a/certService/README.md b/certService/README.md index 96b10913..431ff1df 100644 --- a/certService/README.md +++ b/certService/README.md @@ -60,4 +60,27 @@ Go to created directory and run sudo ./run-csit.sh plans/aaf/cert-service ``` +### Logs locally + +path: + + ``` + var/log/onap/aaf/certservice/ + ``` +### Logs in Docker container + ``` + docker exec -it cert-service bash + ``` + +path: + + ``` + cd /var/log/onap/aaf/certservice + ``` +You should see: +audit.log error.log trace.log + + + + |