aboutsummaryrefslogtreecommitdiffstats
path: root/plans/so/integration-etsi-testing/so-simulators/package/docker
diff options
context:
space:
mode:
Diffstat (limited to 'plans/so/integration-etsi-testing/so-simulators/package/docker')
-rw-r--r--plans/so/integration-etsi-testing/so-simulators/package/docker/src/main/docker/docker-files/Dockerfile.so-simulator-base-image5
-rw-r--r--plans/so/integration-etsi-testing/so-simulators/package/docker/src/main/docker/docker-files/scripts/start-app.sh13
2 files changed, 17 insertions, 1 deletions
diff --git a/plans/so/integration-etsi-testing/so-simulators/package/docker/src/main/docker/docker-files/Dockerfile.so-simulator-base-image b/plans/so/integration-etsi-testing/so-simulators/package/docker/src/main/docker/docker-files/Dockerfile.so-simulator-base-image
index f6f0fc9b..efd7833f 100644
--- a/plans/so/integration-etsi-testing/so-simulators/package/docker/src/main/docker/docker-files/Dockerfile.so-simulator-base-image
+++ b/plans/so/integration-etsi-testing/so-simulators/package/docker/src/main/docker/docker-files/Dockerfile.so-simulator-base-image
@@ -16,7 +16,7 @@ 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
-RUN mkdir /app && mkdir /app/config && mkdir /app/logs
+RUN mkdir /app && mkdir /app/config && mkdir /app/logs && mkdir /app/ca-certificates
COPY maven/app.jar /app
COPY configs/logging/logback-spring.xml /app
@@ -27,5 +27,8 @@ RUN chown -R so:so /app && chmod 700 /app/*.sh
# Springboot configuration (required)
VOLUME /app/config
+# CA certificates
+VOLUME /app/ca-certificates
+
WORKDIR /app
CMD ["/app/start-app.sh"]
diff --git a/plans/so/integration-etsi-testing/so-simulators/package/docker/src/main/docker/docker-files/scripts/start-app.sh b/plans/so/integration-etsi-testing/so-simulators/package/docker/src/main/docker/docker-files/scripts/start-app.sh
index 0ab3d27f..eb8ee2e5 100644
--- a/plans/so/integration-etsi-testing/so-simulators/package/docker/src/main/docker/docker-files/scripts/start-app.sh
+++ b/plans/so/integration-etsi-testing/so-simulators/package/docker/src/main/docker/docker-files/scripts/start-app.sh
@@ -22,6 +22,19 @@
touch /app/app.jar
+if [ "$(ls -1 /app/ca-certificates)" ]; then
+ needUpdate=FALSE
+ for certificate in `ls -1 /app/ca-certificates`; do
+ echo "Installing $certificate in /usr/local/share/ca-certificates"
+ cp /app/ca-certificates/$certificate /usr/local/share/ca-certificates/$certificate
+ needUpdate=TRUE
+ done
+ if [ $needUpdate = TRUE ]; then
+ echo "Updating ca-certificates . . ."
+ update-ca-certificates --fresh
+ fi
+fi
+
if [ -z "$APP" ]; then
echo "CONFIG ERROR: APP environment variable not set"
exit 1