summaryrefslogtreecommitdiffstats
path: root/alpine
diff options
context:
space:
mode:
Diffstat (limited to 'alpine')
-rw-r--r--alpine/java17/pom.xml20
-rw-r--r--alpine/java17/src/main/docker/Dockerfile23
-rw-r--r--alpine/java17/src/main/resources/README-custom-certs.md3
3 files changed, 40 insertions, 6 deletions
diff --git a/alpine/java17/pom.xml b/alpine/java17/pom.xml
index 5c590f6b..8a09a0be 100644
--- a/alpine/java17/pom.xml
+++ b/alpine/java17/pom.xml
@@ -64,6 +64,26 @@
</resources>
</configuration>
</execution>
+ <execution>
+ <id>copy-certificates</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>*.pem</include>
+ <include>*.md</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
diff --git a/alpine/java17/src/main/docker/Dockerfile b/alpine/java17/src/main/docker/Dockerfile
index 192d618b..5018e1af 100644
--- a/alpine/java17/src/main/docker/Dockerfile
+++ b/alpine/java17/src/main/docker/Dockerfile
@@ -3,16 +3,27 @@ FROM ${base.image}:${base.image.version}
MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org)
USER root
-ARG HTTP_PROXY
-ARG HTTPS_PROXY
+ARG http_proxy
+ARG https_proxy
+ARG no_proxy
-ENV HTTP_PROXY ${HTTP_PROXY}
-ENV http_proxy ${HTTP_PROXY}
-ENV HTTPS_PROXY ${HTTPS_PROXY}
-ENV https_proxy ${HTTPS_PROXY}
+ENV HTTP_PROXY $http_proxy
+ENV http_proxy $http_proxy
+ENV HTTPS_PROXY $https_proxy
+ENV https_proxy $https_proxy
+ENV NO_PROXY $no_proxy
+ENV no_proxy $no_proxy
ENV JAVA_HOME /opt/java/openjdk
+# Copy any certs
+COPY *.md *.pem /etc/ssl/certs/
+
+# Install certs
+RUN update-ca-certificates
+
+RUN echo "http_proxy = $http_proxy" && echo "https_proxy = $https_proxy" && echo "no_proxy = $no_proxy" && echo "HTTP_PROXY = $HTTP_PROXY" && echo "HTTPS_PROXY = $HTTPS_PROXY" && echo "NO_PROXY = $NO_PROXY"
+
# Add tools needed for OpenDaylight
RUN apk update && apk --no-cache add sudo bash iputils openssl git mysql-client nodejs npm python3 py3-pip graphviz unzip rsync nss
diff --git a/alpine/java17/src/main/resources/README-custom-certs.md b/alpine/java17/src/main/resources/README-custom-certs.md
new file mode 100644
index 00000000..ac414c11
--- /dev/null
+++ b/alpine/java17/src/main/resources/README-custom-certs.md
@@ -0,0 +1,3 @@
+Any .pem files in this directory will be copied to /etc/ssl/certs on the
+docker container and installed prior to running apk. This might be needed,
+for example, for docker builds to work properly behind a corporate firewall.