summaryrefslogtreecommitdiffstats
path: root/packages/docker/src
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-03-04 13:27:11 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-03-04 13:28:31 +0100
commit1226e73bf70546cbe245b97c346adc28757692b8 (patch)
tree96c27b0995c2ab0afc068627bd0ac8947f28877a /packages/docker/src
parent97e7341e1206442f286900a3441bda96430e43b3 (diff)
Use base image for SO dockers
ONAP now has a specific base image for all containers using Java. This commit uses this file instead of creating a base image only for SO. Issue-ID: SO-2694 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I9578e4d5556bd175ad65c6d2f9ce917997651c7a
Diffstat (limited to 'packages/docker/src')
-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