diff options
author | efiacor <fiachra.corcoran@est.tech> | 2020-08-26 15:14:21 +0100 |
---|---|---|
committer | Fiachra Corcoran <fiachra.corcoran@est.tech> | 2020-08-27 13:59:11 +0000 |
commit | e0d6e766bde624ca00a386772069685533349b26 (patch) | |
tree | 38376d706ae45ded4505dd176fb36fbf97408be2 | |
parent | 9c49e106ec7a8d9d391456afa0e2d84d3f313220 (diff) |
[DMAAP-DR] Move to alpine based base image2.1.7
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Change-Id: I7627bee3891f9bbd9ef455b9cd69aa4fd264bdbd
Issue-ID: DMAAP-1457
-rw-r--r-- | datarouter-node/src/main/resources/docker/Dockerfile | 21 | ||||
-rw-r--r-- | datarouter-prov/src/main/resources/docker/Dockerfile | 19 | ||||
-rw-r--r-- | datarouter-subscriber/src/main/resources/docker/Dockerfile | 20 | ||||
-rwxr-xr-x | pom.xml | 2 |
4 files changed, 27 insertions, 35 deletions
diff --git a/datarouter-node/src/main/resources/docker/Dockerfile b/datarouter-node/src/main/resources/docker/Dockerfile index 7357d931..35e7bd0d 100644 --- a/datarouter-node/src/main/resources/docker/Dockerfile +++ b/datarouter-node/src/main/resources/docker/Dockerfile @@ -18,26 +18,23 @@ # limitations under the License. # ============LICENSE_END==================================================== # -FROM openjdk:11.0.6-jre-slim - -MAINTAINER DMAAP Team +FROM adoptopenjdk/openjdk11:jre-11.0.8_10-alpine COPY /opt /opt -# curl used for healthcheck -RUN apt-get update && \ - apt-get install -y \ - curl \ - vim +ARG user=onap +ARG group=onap + +RUN apk update && apk add curl && apk add vim EXPOSE 8080 8443 WORKDIR /opt RUN chmod 0700 startup.sh + ENTRYPOINT ["sh", "startup.sh"] -RUN groupadd -g 1001 onap \ - && useradd -u 1000 dradmin -g onap \ - && chown -R dradmin:onap /opt/ /var/ +RUN addgroup -S $group && adduser -G $group -D $user \ + && chown -R $user:$group /opt/ /var/log -USER dradmin +USER $user
\ No newline at end of file diff --git a/datarouter-prov/src/main/resources/docker/Dockerfile b/datarouter-prov/src/main/resources/docker/Dockerfile index 51841fd5..35e7bd0d 100644 --- a/datarouter-prov/src/main/resources/docker/Dockerfile +++ b/datarouter-prov/src/main/resources/docker/Dockerfile @@ -18,16 +18,14 @@ # limitations under the License. # ============LICENSE_END==================================================== # -FROM openjdk:11.0.6-jre-slim - -MAINTAINER DMAAP Team +FROM adoptopenjdk/openjdk11:jre-11.0.8_10-alpine COPY /opt /opt -RUN apt-get update && \ - apt-get install -y \ - curl \ - vim +ARG user=onap +ARG group=onap + +RUN apk update && apk add curl && apk add vim EXPOSE 8080 8443 @@ -36,8 +34,7 @@ RUN chmod 0700 startup.sh ENTRYPOINT ["sh", "startup.sh"] -RUN groupadd -g 1001 onap \ - && useradd -u 1000 dradmin -g onap \ - && chown -R dradmin:onap /opt/ /var/ +RUN addgroup -S $group && adduser -G $group -D $user \ + && chown -R $user:$group /opt/ /var/log -USER dradmin
\ No newline at end of file +USER $user
\ No newline at end of file diff --git a/datarouter-subscriber/src/main/resources/docker/Dockerfile b/datarouter-subscriber/src/main/resources/docker/Dockerfile index 81c9dcca..35e7bd0d 100644 --- a/datarouter-subscriber/src/main/resources/docker/Dockerfile +++ b/datarouter-subscriber/src/main/resources/docker/Dockerfile @@ -18,25 +18,23 @@ # limitations under the License. # ============LICENSE_END==================================================== # -FROM openjdk:11.0.6-jre-slim - -MAINTAINER DMAAP Team +FROM adoptopenjdk/openjdk11:jre-11.0.8_10-alpine COPY /opt /opt -RUN apt-get update && \ - apt-get install -y \ - curl \ - vim +ARG user=onap +ARG group=onap + +RUN apk update && apk add curl && apk add vim EXPOSE 8080 8443 WORKDIR /opt RUN chmod 0700 startup.sh + ENTRYPOINT ["sh", "startup.sh"] -RUN groupadd -g 1001 onap \ - && useradd -u 1000 dradmin -g onap \ - && chown -R dradmin:onap /opt/ /var/ +RUN addgroup -S $group && adduser -G $group -D $user \ + && chown -R $user:$group /opt/ /var/log -USER dradmin
\ No newline at end of file +USER $user
\ No newline at end of file @@ -69,7 +69,7 @@ <io.fabric8.version>0.33.0</io.fabric8.version> <docker.apiVersion>2.2.54</docker.apiVersion> <commons-lang.version>2.4</commons-lang.version> - <commons-io.version>2.6</commons-io.version> + <commons-io.version>2.7</commons-io.version> <httpcore.version>4.4</httpcore.version> <httpclient.version>4.5.3</httpclient.version> <junit-runner.version>0.11</junit-runner.version> |