summaryrefslogtreecommitdiffstats
path: root/packages/docker
diff options
context:
space:
mode:
Diffstat (limited to 'packages/docker')
-rw-r--r--packages/docker/pom.xml45
-rw-r--r--packages/docker/src/main/docker/docker-files/Dockerfile.so-app19
-rw-r--r--packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image5
-rw-r--r--packages/docker/src/main/docker/docker-files/scripts/.gitattributes5
-rwxr-xr-x[-rw-r--r--]packages/docker/src/main/docker/docker-files/scripts/start-app.sh4
5 files changed, 31 insertions, 47 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 e8f02f12c6..dc86ff8290 100644
--- a/packages/docker/src/main/docker/docker-files/Dockerfile.so-app
+++ b/packages/docker/src/main/docker/docker-files/Dockerfile.so-app
@@ -7,23 +7,20 @@ 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
+RUN mkdir -p /app/certificates
+RUN mkdir -p /app/logs
+RUN mkdir -p /app/ca-certificates
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 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
-
+USER so
# Springboot configuration (required)
VOLUME /app/config
@@ -31,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
index c0b298e778..031142f216 100644
--- a/packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image
+++ b/packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image
@@ -7,11 +7,8 @@ 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
+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/.gitattributes b/packages/docker/src/main/docker/docker-files/scripts/.gitattributes
new file mode 100644
index 0000000000..b905d1de69
--- /dev/null
+++ b/packages/docker/src/main/docker/docker-files/scripts/.gitattributes
@@ -0,0 +1,5 @@
+# Default behavior
+* text=auto
+
+# Files to have unix style line endings on checkout
+*.sh text eol=lf \ No newline at end of file
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..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
@@ -16,7 +16,7 @@ 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"
fi
@@ -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