diff options
Diffstat (limited to 'packages/docker')
-rw-r--r-- | packages/docker/pom.xml | 45 | ||||
-rw-r--r-- | packages/docker/src/main/docker/docker-files/Dockerfile.so-app | 15 | ||||
-rw-r--r-- | packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image | 14 | ||||
-rwxr-xr-x[-rw-r--r--] | packages/docker/src/main/docker/docker-files/scripts/start-app.sh | 4 |
4 files changed, 39 insertions, 39 deletions
diff --git a/packages/docker/pom.xml b/packages/docker/pom.xml index 8d95d063da..b231dedf91 100644 --- a/packages/docker/pom.xml +++ b/packages/docker/pom.xml @@ -77,16 +77,14 @@ <name>${docker.image.prefix}/base-image:1.0</name> <build> <cleanup>try</cleanup> - <dockerFileDir>docker-files</dockerFileDir> - <dockerFile>Dockerfile.so-base-image</dockerFile> + <dockerFile>docker-files/Dockerfile.so-base-image</dockerFile> </build> </image> <image> <name>${docker.image.prefix}/vnfm-adapter</name> <build> <cleanup>try</cleanup> - <dockerFileDir>docker-files</dockerFileDir> - <dockerFile>Dockerfile.so-app</dockerFile> + <dockerFile>docker-files/Dockerfile.so-app</dockerFile> <tags> <tag>${project.version}</tag> <tag>${project.version}-${maven.build.timestamp}</tag> @@ -110,8 +108,7 @@ <name>${docker.image.prefix}/ve-vnfm-adapter</name> <build> <cleanup>try</cleanup> - <dockerFileDir>docker-files</dockerFileDir> - <dockerFile>Dockerfile.so-app</dockerFile> + <dockerFile>docker-files/Dockerfile.so-app</dockerFile> <tags> <tag>${project.version}</tag> <tag>${project.version}-${maven.build.timestamp}</tag> @@ -135,8 +132,7 @@ <name>${docker.image.prefix}/catalog-db-adapter</name> <build> <cleanup>try</cleanup> - <dockerFileDir>docker-files</dockerFileDir> - <dockerFile>Dockerfile.so-app</dockerFile> + <dockerFile>docker-files/Dockerfile.so-app</dockerFile> <tags> <tag>${project.version}</tag> <tag>${project.version}-${maven.build.timestamp}</tag> @@ -160,8 +156,7 @@ <name>${docker.image.prefix}/request-db-adapter</name> <build> <cleanup>try</cleanup> - <dockerFileDir>docker-files</dockerFileDir> - <dockerFile>Dockerfile.so-app</dockerFile> + <dockerFile>docker-files/Dockerfile.so-app</dockerFile> <tags> <tag>${project.version}</tag> <tag>${project.version}-${maven.build.timestamp}</tag> @@ -185,8 +180,7 @@ <name>${docker.image.prefix}/sdnc-adapter</name> <build> <cleanup>try</cleanup> - <dockerFileDir>docker-files</dockerFileDir> - <dockerFile>Dockerfile.so-app</dockerFile> + <dockerFile>docker-files/Dockerfile.so-app</dockerFile> <tags> <tag>${project.version}</tag> <tag>${project.version}-${maven.build.timestamp}</tag> @@ -210,8 +204,7 @@ <name>${docker.image.prefix}/openstack-adapter</name> <build> <cleanup>try</cleanup> - <dockerFileDir>docker-files</dockerFileDir> - <dockerFile>Dockerfile.so-app</dockerFile> + <dockerFile>docker-files/Dockerfile.so-app</dockerFile> <tags> <tag>${project.version}</tag> <tag>${project.version}-${maven.build.timestamp}</tag> @@ -235,8 +228,7 @@ <name>${docker.image.prefix}/vfc-adapter</name> <build> <cleanup>try</cleanup> - <dockerFileDir>docker-files</dockerFileDir> - <dockerFile>Dockerfile.so-app</dockerFile> + <dockerFile>docker-files/Dockerfile.so-app</dockerFile> <tags> <tag>${project.version}</tag> <tag>${project.version}-${maven.build.timestamp}</tag> @@ -260,8 +252,7 @@ <name>${docker.image.prefix}/nssmf-adapter</name> <build> <cleanup>try</cleanup> - <dockerFileDir>docker-files</dockerFileDir> - <dockerFile>Dockerfile.so-app</dockerFile> + <dockerFile>docker-files/Dockerfile.so-app</dockerFile> <tags> <tag>${project.version}</tag> <tag>${project.version}-${maven.build.timestamp}</tag> @@ -285,8 +276,7 @@ <name>${docker.image.prefix}/so-appc-orchestrator</name> <build> <cleanup>try</cleanup> - <dockerFileDir>docker-files</dockerFileDir> - <dockerFile>Dockerfile.so-app</dockerFile> + <dockerFile>docker-files/Dockerfile.so-app</dockerFile> <tags> <tag>${project.version}</tag> <tag>${project.version}-${maven.build.timestamp}</tag> @@ -310,8 +300,7 @@ <name>${docker.image.prefix}/sdc-controller</name> <build> <cleanup>try</cleanup> - <dockerFileDir>docker-files</dockerFileDir> - <dockerFile>Dockerfile.so-app</dockerFile> + <dockerFile>docker-files/Dockerfile.so-app</dockerFile> <tags> <tag>${project.version}</tag> <tag>${project.version}-${maven.build.timestamp}</tag> @@ -335,8 +324,7 @@ <name>${docker.image.prefix}/bpmn-infra</name> <build> <cleanup>try</cleanup> - <dockerFileDir>docker-files</dockerFileDir> - <dockerFile>Dockerfile.so-app</dockerFile> + <dockerFile>docker-files/Dockerfile.so-app</dockerFile> <tags> <tag>${project.version}</tag> <tag>${project.version}-${maven.build.timestamp}</tag> @@ -360,8 +348,7 @@ <name>${docker.image.prefix}/api-handler-infra</name> <build> <cleanup>try</cleanup> - <dockerFileDir>docker-files</dockerFileDir> - <dockerFile>Dockerfile.so-app</dockerFile> + <dockerFile>docker-files/Dockerfile.so-app</dockerFile> <tags> <tag>${project.version}</tag> <tag>${project.version}-${maven.build.timestamp}</tag> @@ -385,8 +372,7 @@ <name>${docker.image.prefix}/so-monitoring</name> <build> <cleanup>try</cleanup> - <dockerFileDir>docker-files</dockerFileDir> - <dockerFile>Dockerfile.so-app</dockerFile> + <dockerFile>docker-files/Dockerfile.so-app</dockerFile> <tags> <tag>${project.version}</tag> <tag>${project.version}-${maven.build.timestamp}</tag> @@ -410,8 +396,7 @@ <name>${docker.image.prefix}/so-simulator</name> <build> <cleanup>try</cleanup> - <dockerFileDir>docker-files</dockerFileDir> - <dockerFile>Dockerfile.so-app</dockerFile> + <dockerFile>docker-files/Dockerfile.so-app</dockerFile> <tags> <tag>${project.version}</tag> <tag>${project.version}-${maven.build.timestamp}</tag> diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.so-app b/packages/docker/src/main/docker/docker-files/Dockerfile.so-app index 84bd2987e3..dc86ff8290 100644 --- a/packages/docker/src/main/docker/docker-files/Dockerfile.so-app +++ b/packages/docker/src/main/docker/docker-files/Dockerfile.so-app @@ -1,4 +1,4 @@ -FROM registry.gitlab.com/onap-integration/docker/onap-java +FROM onap/so/base-image:1.0 ARG http_proxy ENV HTTP_PROXY=$http_proxy @@ -8,18 +8,19 @@ ENV HTTPS_PROXY=$https_proxy ENV https_proxy=$HTTPS_PROXY USER root -RUN mkdir -p /app/{config,certificates,logs,ca-certificates} -RUN chown -R onap:onap /app && chmod 700 /app/*.sh +RUN mkdir -p /app/config +RUN mkdir -p /app/certificates +RUN mkdir -p /app/logs +RUN mkdir -p /app/ca-certificates -USER onap COPY maven/app.jar /app COPY configs/logging/logback-spring.xml /app COPY scripts/start-app.sh /app COPY scripts/wait-for.sh /app COPY ca-certificates/onap-ca.crt /app/ca-certificates/onap-ca.crt +RUN chown -R so:so /app -RUN chmod 700 /app/*.sh - +USER so # Springboot configuration (required) VOLUME /app/config @@ -27,4 +28,4 @@ VOLUME /app/config VOLUME /app/ca-certificates WORKDIR /app -CMD ["/app/start-app.sh"] +ENTRYPOINT ["/app/start-app.sh"] diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image b/packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image new file mode 100644 index 0000000000..031142f216 --- /dev/null +++ b/packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image @@ -0,0 +1,14 @@ +FROM docker.io/openjdk:8-jdk-alpine + +ARG http_proxy +ARG https_proxy +ENV HTTP_PROXY=$http_proxy +ENV HTTPS_PROXY=$https_proxy +ENV http_proxy=$HTTP_PROXY +ENV https_proxy=$HTTPS_PROXY + +# Install commonly needed tools +RUN apk --no-cache add curl netcat-openbsd nss + +# Create 'so' user +RUN addgroup -g 1000 so && adduser -S -u 1000 -G so -s /bin/sh so diff --git a/packages/docker/src/main/docker/docker-files/scripts/start-app.sh b/packages/docker/src/main/docker/docker-files/scripts/start-app.sh index ebab3c6ea3..74d17fc9b7 100644..100755 --- a/packages/docker/src/main/docker/docker-files/scripts/start-app.sh +++ b/packages/docker/src/main/docker/docker-files/scripts/start-app.sh @@ -18,7 +18,7 @@ then # Re-exec this script as the 'onap' user. this=`readlink -f $0` - exec su onap -c "$this" + exec su so -c "$this" fi touch /app/app.jar @@ -46,7 +46,7 @@ fi if [ ${APP} = "bpmn-infra" ]; then ln -s ${LOG_PATH} BPMN -fi +fi if [ ${APP} = "so-monitoring" ]; then ln -s ${LOG_PATH} MONITORING |