summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2020-03-06 07:29:50 +0000
committerGerrit Code Review <gerrit@onap.org>2020-03-06 07:29:50 +0000
commit2a278fedffa02f01f9fbc059fc25eab103cd7986 (patch)
tree2d438940cb587ff1c42cd4cab7a70f3758c231a8
parent03117ffcb30ef5735a46c72a5f7ba10cdb66dc37 (diff)
parent1226e73bf70546cbe245b97c346adc28757692b8 (diff)
Merge "Use base image for SO dockers"
-rw-r--r--packages/docker/src/main/docker/docker-files/Dockerfile.so-app16
-rw-r--r--packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image17
-rw-r--r--packages/docker/src/main/docker/docker-files/scripts/start-app.sh4
3 files changed, 8 insertions, 29 deletions
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 e8f02f12c6..84bd2987e3 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 onap/so/base-image:1.0
+FROM registry.gitlab.com/onap-integration/docker/onap-java
ARG http_proxy
ENV HTTP_PROXY=$http_proxy
@@ -7,22 +7,18 @@ ARG https_proxy
ENV HTTPS_PROXY=$https_proxy
ENV https_proxy=$HTTPS_PROXY
-RUN mkdir /app && mkdir /app/config && mkdir /app/certificates && mkdir /app/logs && mkdir /app/ca-certificates
+USER root
+RUN mkdir -p /app/{config,certificates,logs,ca-certificates}
+RUN chown -R onap:onap /app && chmod 700 /app/*.sh
+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 && chmod 700 /app/*.sh
-
-## TODO for Casablanca: install this in the openstack-adapter container
-## Install heatbridge
-#RUN apt-get install -y python && apt-get install -y python-pip && echo 'PIP Installed, doing upgrade' && pip install --upgrade pip
-#RUN mkdir /opt/mso/heatbridge
-#COPY heatbridge/heatbridge-0.3.0.dev0-py2-none-any.whl /opt/mso/heatbridge
-#RUN pip install /opt/mso/heatbridge/heatbridge-0.3.0.dev0-py2-none-any.whl
+RUN chmod 700 /app/*.sh
# Springboot configuration (required)
VOLUME /app/config
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
deleted file mode 100644
index c0b298e778..0000000000
--- a/packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image
+++ /dev/null
@@ -1,17 +0,0 @@
-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
-
-# Update the package list and upgrade installed packages
-RUN apk update && apk upgrade
-
-# Install commonly needed tools
-RUN apk --no-cache add curl netcat-openbsd sudo 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 75d64fefa0..ebab3c6ea3 100644
--- a/packages/docker/src/main/docker/docker-files/scripts/start-app.sh
+++ b/packages/docker/src/main/docker/docker-files/scripts/start-app.sh
@@ -16,9 +16,9 @@ then
update-ca-certificates --fresh
fi
- # Re-exec this script as the 'so' user.
+ # Re-exec this script as the 'onap' user.
this=`readlink -f $0`
- exec su so -c "$this"
+ exec su onap -c "$this"
fi
touch /app/app.jar