add java 11 alpine image 41/109641/1 master
authorMichael Dürre <michael.duerre@highstreet-technologies.com>
Mon, 29 Jun 2020 07:59:57 +0000 (09:59 +0200)
committerMichael Dürre <michael.duerre@highstreet-technologies.com>
Mon, 29 Jun 2020 08:00:12 +0000 (10:00 +0200)
parallel alpine image with java 11 installed

Issue-ID: CCSDK-2484
Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
Change-Id: Ia20a2175ee623f2400327b9fc25265c464780e65

alpine/java11/pom.xml [new file with mode: 0644]
alpine/java11/src/main/docker/Dockerfile [new file with mode: 0644]
alpine/java8/pom.xml [new file with mode: 0644]
alpine/java8/src/main/docker/Dockerfile [moved from alpine/src/main/docker/Dockerfile with 80% similarity]
alpine/pom.xml
odlsli/odlsli-alpine/pom.xml
opendaylight/sodium/sodium-alpine/src/main/docker/Dockerfile

diff --git a/alpine/java11/pom.xml b/alpine/java11/pom.xml
new file mode 100644 (file)
index 0000000..2a32b40
--- /dev/null
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.onap.ccsdk.distribution</groupId>
+        <artifactId>distribution-root</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>distribution-j11-alpine</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <name>ccsdk-distribution :: alpine :: java11</name>
+    <description>Creates base alpine Docker container</description>
+    <organization>
+        <name>openECOMP</name>
+    </organization>
+
+    <properties>
+        <image.name>onap/ccsdk-alpine-j11-image</image.name>
+        <ccsdk.project.version>${project.version}</ccsdk.project.version>
+        <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
+    </properties>
+
+    <build>
+        <plugins>
+
+            <plugin>
+                <groupId>org.codehaus.groovy.maven</groupId>
+                <artifactId>gmaven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>     
+                            <source>${basedir}/../../src/main/scripts/TagVersion.groovy</source>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>2.6</version>
+                <executions>
+                    <execution>
+                        <id>copy-dockerfile</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/docker</directory>
+                                    <includes>
+                                        <include>Dockerfile</include>
+                                    </includes>
+                                    <filtering>true</filtering>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>io.fabric8</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                        <version>0.28.0</version>
+                        <inherited>false</inherited>
+                        <configuration>
+
+                            <images>
+                                <image>
+                                    <name>${image.name}</name>
+                                    <build>
+                                        <cleanup>try</cleanup>
+                                        <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+                                        <dockerFile>Dockerfile</dockerFile>
+                                        <tags>
+                                            <tag>${project.docker.latestminortag.version}</tag>
+                                            <tag>${project.docker.latestfulltag.version}</tag>              
+                                            <tag>${project.docker.latesttagtimestamp.version}</tag>
+                                        </tags>
+                                    </build>
+                                </image>
+                            </images>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>generate-images</id>
+                                <phase>generate-sources</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                </goals>
+                            </execution>
+
+                            <execution>
+                                <id>push-images</id>
+                                <phase>deploy</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                    <goal>push</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
diff --git a/alpine/java11/src/main/docker/Dockerfile b/alpine/java11/src/main/docker/Dockerfile
new file mode 100644 (file)
index 0000000..9a993e9
--- /dev/null
@@ -0,0 +1,16 @@
+# Base alpine with added packages needed for open ecomp
+FROM alpine:3.12
+MAINTAINER CCSDK  Team (onap-ccsdk@lists.onap.org)
+
+ARG HTTP_PROXY
+ARG HTTPS_PROXY
+
+ENV HTTP_PROXY  ${HTTP_PROXY}
+ENV http_proxy  ${HTTP_PROXY}
+ENV HTTPS_PROXY ${HTTPS_PROXY}
+ENV https_proxy ${HTTPS_PROXY}
+
+ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk
+# Add tools needed for OpenDaylight
+RUN apk --no-cache add openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \
+  && apk update && apk --no-cache add bash git openjdk11 maven mysql-client nodejs python3 graphviz unzip rsync nss
\ No newline at end of file
diff --git a/alpine/java8/pom.xml b/alpine/java8/pom.xml
new file mode 100644 (file)
index 0000000..6d13a4f
--- /dev/null
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.onap.ccsdk.distribution</groupId>
+        <artifactId>distribution-root</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>distribution-alpine</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <name>ccsdk-distribution :: alpine</name>
+    <description>Creates base alpine Docker container</description>
+    <organization>
+        <name>openECOMP</name>
+    </organization>
+
+    <properties>
+        <image.name>onap/ccsdk-alpine-image</image.name>
+        <ccsdk.project.version>${project.version}</ccsdk.project.version>
+        <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
+    </properties>
+
+    <build>
+        <plugins>
+
+            <plugin>
+                <groupId>org.codehaus.groovy.maven</groupId>
+                <artifactId>gmaven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>     
+                            <source>${basedir}/../../src/main/scripts/TagVersion.groovy</source>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>2.6</version>
+                <executions>
+                    <execution>
+                        <id>copy-dockerfile</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/docker</directory>
+                                    <includes>
+                                        <include>Dockerfile</include>
+                                    </includes>
+                                    <filtering>true</filtering>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>io.fabric8</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                        <version>0.28.0</version>
+                        <inherited>false</inherited>
+                        <configuration>
+
+                            <images>
+                                <image>
+                                    <name>${image.name}</name>
+                                    <build>
+                                        <cleanup>try</cleanup>
+                                        <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+                                        <dockerFile>Dockerfile</dockerFile>
+                                        <tags>
+                                            <tag>${project.docker.latestminortag.version}</tag>
+                                            <tag>${project.docker.latestfulltag.version}</tag>              
+                                            <tag>${project.docker.latesttagtimestamp.version}</tag>
+                                        </tags>
+                                    </build>
+                                </image>
+                            </images>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>generate-images</id>
+                                <phase>generate-sources</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                </goals>
+                            </execution>
+
+                            <execution>
+                                <id>push-images</id>
+                                <phase>deploy</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                    <goal>push</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
similarity index 80%
rename from alpine/src/main/docker/Dockerfile
rename to alpine/java8/src/main/docker/Dockerfile
index 2e29c4d..8dde928 100644 (file)
@@ -10,5 +10,6 @@ ENV http_proxy  ${HTTP_PROXY}
 ENV HTTPS_PROXY ${HTTPS_PROXY}
 ENV https_proxy ${HTTPS_PROXY}
 
+ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
 # Add tools needed for OpenDaylight
-RUN apk update && apk --no-cache add bash git openjdk8 maven mysql-client nodejs python3 graphviz unzip rsync nss
+RUN apk update && apk --no-cache add bash git openjdk8 maven mysql-client nodejs python3 graphviz unzip rsync nss
\ No newline at end of file
index 3862692..dcdae7e 100644 (file)
         <version>1.0.0-SNAPSHOT</version>
     </parent>
 
-    <artifactId>distribution-alpine</artifactId>
+    <artifactId>distribution-alpine-root</artifactId>
     <version>1.0.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
-    <name>ccsdk-distribution :: alpine</name>
-    <description>Creates base alpine Docker container</description>
-    <organization>
-        <name>openECOMP</name>
-    </organization>
+    <name>ccsdk-distribution :: opendaylight</name>
+    <description>Creates OpenDaylight container</description>
 
-    <properties>
-        <image.name>onap/ccsdk-alpine-image</image.name>
-        <ccsdk.project.version>${project.version}</ccsdk.project.version>
-        <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
-    </properties>
-
-    <build>
-        <plugins>
-
-            <plugin>
-                <groupId>org.codehaus.groovy.maven</groupId>
-                <artifactId>gmaven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>validate</phase>
-                        <goals>
-                            <goal>execute</goal>
-                        </goals>
-                        <configuration>     
-                            <source>${basedir}/../src/main/scripts/TagVersion.groovy</source>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <artifactId>maven-resources-plugin</artifactId>
-                <version>2.6</version>
-                <executions>
-                    <execution>
-                        <id>copy-dockerfile</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/docker</directory>
-                                    <includes>
-                                        <include>Dockerfile</include>
-                                    </includes>
-                                    <filtering>true</filtering>
-                                </resource>
-                            </resources>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-    <profiles>
-        <profile>
-            <id>docker</id>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>io.fabric8</groupId>
-                        <artifactId>docker-maven-plugin</artifactId>
-                        <version>0.28.0</version>
-                        <inherited>false</inherited>
-                        <configuration>
-
-                            <images>
-                                <image>
-                                    <name>${image.name}</name>
-                                    <build>
-                                        <cleanup>try</cleanup>
-                                        <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
-                                        <dockerFile>Dockerfile</dockerFile>
-                                        <tags>
-                                            <tag>${project.docker.latestminortag.version}</tag>
-                                            <tag>${project.docker.latestfulltag.version}</tag>              
-                                            <tag>${project.docker.latesttagtimestamp.version}</tag>
-                                        </tags>
-                                    </build>
-                                </image>
-                            </images>
-                        </configuration>
-                        <executions>
-                            <execution>
-                                <id>generate-images</id>
-                                <phase>generate-sources</phase>
-                                <goals>
-                                    <goal>build</goal>
-                                </goals>
-                            </execution>
-
-                            <execution>
-                                <id>push-images</id>
-                                <phase>deploy</phase>
-                                <goals>
-                                    <goal>build</goal>
-                                    <goal>push</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
+    <modules>
+        <module>java8</module>
+        <module>java11</module>
+    </modules>
 </project>
index a7ec8cd..20cd4ad 100644 (file)
@@ -21,7 +21,7 @@
     </organization>
 
     <properties>
-        <base.image.name>onap/ccsdk-odl-neon-alpine-image</base.image.name>
+        <base.image.name>onap/ccsdk-odl-sodium-alpine-image</base.image.name>
         <image.name>onap/ccsdk-odlsli-alpine-image</image.name>
         <ccsdk.project.version>${project.version}</ccsdk.project.version>
         <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
index be35e54..ba64a4b 100644 (file)
@@ -1,10 +1,7 @@
-FROM onap/ccsdk-alpine-image:${project.docker.latestfulltag.version}
+FROM onap/ccsdk-alpine-j11-image:${project.docker.latestfulltag.version}
 MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org)
-ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
-ENV ODL_HOME /opt/opendaylight/current
 
-# make python2 also available up until OpenDaylight migrates to python3
-RUN apk add --no-cache py2-pip
+ENV ODL_HOME /opt/opendaylight/current
 
 # copy the opendaylight tar and expand
 COPY ${odl.karaf.artifactId}-${ccsdk.opendaylight.version}.tar.gz /tmp/

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use