You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2022/03/27 16:43:10 UTC

[incubator-streampipes] branch dev updated: [STREAMPIPES-518] Change docker build for all services

This is an automated email from the ASF dual-hosted git repository.

zehnder pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git


The following commit(s) were added to refs/heads/dev by this push:
     new c2e2603  [STREAMPIPES-518] Change docker build for all services
c2e2603 is described below

commit c2e2603ef3005e19fda3e641248ecdafd4ac6412
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Sun Mar 27 18:42:27 2022 +0200

    [STREAMPIPES-518] Change docker build for all services
---
 .github/workflows/build.yml                        | 181 ++++++---------------
 .../streampipes-connect-adapters-iiot/Dockerfile   |   3 +-
 .../streampipes-connect-adapters/Dockerfile        |   3 +-
 .../streampipes-extensions-all-jvm/Dockerfile      |   3 +-
 .../Dockerfile                                     |   3 +-
 .../Dockerfile                                     |   3 +-
 .../streampipes-sinks-internal-jvm/Dockerfile      |   3 +-
 ui/Dockerfile                                      |   3 +-
 8 files changed, 56 insertions(+), 146 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b0eb21d..af9fb37 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -73,142 +73,59 @@ jobs:
           NODE_OPTIONS=--max_old_space_size=6096
           npm install --unsafe-perm --legacy-peer-deps
           npm run build
+
       - name: Build and Push Docker UI Image
-        working-directory: ./ui
-        env:
-          IMG_NAME_DEFAULT: ${{ env.DOCKERHUB_APACHE_REPO }}/ui:${{ env.MVN_VERSION }}
-          IMG_NAME_AMD64: ${{ env.DOCKERHUB_APACHE_REPO }}/ui:amd64-${{ env.MVN_VERSION }}
-          IMG_NAME_ARM32V7: ${{ env.DOCKERHUB_APACHE_REPO }}/ui:arm32v7-${{ env.MVN_VERSION }}
-          IMG_NAME_ARM64V8: ${{ env.DOCKERHUB_APACHE_REPO }}/ui:arm64v8-${{ env.MVN_VERSION }}
-        run: |
-          docker build --no-cache --pull --build-arg BASE_IMAGE=$BASE_IMG_NGINX_DEFAULT -t $IMG_NAME_DEFAULT -t $IMG_NAME_AMD64 -f Dockerfile .
-          docker build --no-cache --pull --build-arg BASE_IMAGE=$BASE_IMG_NGINX_ARM32V7 -t $IMG_NAME_ARM32V7 -f arm.Dockerfile .
-          docker build --no-cache --pull --build-arg BASE_IMAGE=$BASE_IMG_NGINX_ARM64V8 -t $IMG_NAME_ARM64V8 -f aarch64.Dockerfile .
-          docker push $IMG_NAME_DEFAULT
-          docker push $IMG_NAME_AMD64
-          docker push $IMG_NAME_ARM32V7
-          docker push $IMG_NAME_ARM64V8
-          docker manifest create $IMG_NAME_DEFAULT $IMG_NAME_AMD64 $IMG_NAME_ARM32V7 $IMG_NAME_ARM64V8
-          docker manifest annotate $IMG_NAME_DEFAULT $IMG_NAME_ARM32V7 --os linux --arch arm
-          docker manifest annotate $IMG_NAME_DEFAULT $IMG_NAME_ARM64V8 --os linux --arch arm64
-          docker manifest push $IMG_NAME_DEFAULT
+        uses: docker/build-push-action@v2
+        with:
+          context: ./ui
+          platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
+          push: true
+          tags: ${{ env.DOCKERHUB_APACHE_REPO }}/ui:${{ env.MVN_VERSION }}
+
       - name: Build and Push Docker Image connect-adapters
-        working-directory: ./streampipes-extensions/streampipes-connect-adapters
-        env:
-          IMG_NAME_DEFAULT: ${{ env.DOCKERHUB_APACHE_REPO }}/connect-adapters:${{ env.MVN_VERSION }}
-          IMG_NAME_AMD64: ${{ env.DOCKERHUB_APACHE_REPO }}/connect-adapters:amd64-${{ env.MVN_VERSION }}
-          IMG_NAME_ARM32V7: ${{ env.DOCKERHUB_APACHE_REPO }}/connect-adapters:arm32v7-${{ env.MVN_VERSION }}
-          IMG_NAME_ARM64V8: ${{ env.DOCKERHUB_APACHE_REPO }}/connect-adapters:arm64v8-${{ env.MVN_VERSION }}
-        run: |
-          cp /usr/bin/{qemu-arm-static,qemu-aarch64-static} .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_DEFAULT -t $IMG_NAME_DEFAULT -t $IMG_NAME_AMD64 -f Dockerfile .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_ARM32V7 -t $IMG_NAME_ARM32V7 -f arm.Dockerfile .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_ARM64V8 -t $IMG_NAME_ARM64V8 -f aarch64.Dockerfile .
-          docker push $IMG_NAME_DEFAULT
-          docker push $IMG_NAME_AMD64
-          docker push $IMG_NAME_ARM32V7
-          docker push $IMG_NAME_ARM64V8
-          docker manifest create $IMG_NAME_DEFAULT $IMG_NAME_AMD64 $IMG_NAME_ARM32V7 $IMG_NAME_ARM64V8
-          docker manifest annotate $IMG_NAME_DEFAULT $IMG_NAME_ARM32V7 --os linux --arch arm
-          docker manifest annotate $IMG_NAME_DEFAULT $IMG_NAME_ARM64V8 --os linux --arch arm64
-          docker manifest push $IMG_NAME_DEFAULT
+        uses: docker/build-push-action@v2
+        with:
+          context: ./streampipes-extensions/streampipes-connect-adapters
+          platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
+          push: true
+          tags: ${{ env.DOCKERHUB_APACHE_REPO }}/connect-adapters:${{ env.MVN_VERSION }}
+
       - name: Build and Push Docker Image connect-adapters-iiot
-        working-directory: ./streampipes-extensions/streampipes-connect-adapters-iiot
-        env:
-          IMG_NAME_DEFAULT: ${{ env.DOCKERHUB_APACHE_REPO }}/connect-adapters-iiot:${{ env.MVN_VERSION }}
-          IMG_NAME_AMD64: ${{ env.DOCKERHUB_APACHE_REPO }}/connect-adapters-iiot:amd64-${{ env.MVN_VERSION }}
-          IMG_NAME_ARM32V7: ${{ env.DOCKERHUB_APACHE_REPO }}/connect-adapters-iiot:arm32v7-${{ env.MVN_VERSION }}
-          IMG_NAME_ARM64V8: ${{ env.DOCKERHUB_APACHE_REPO }}/connect-adapters-iiot:arm64v8-${{ env.MVN_VERSION }}
-        run: |
-          cp /usr/bin/{qemu-arm-static,qemu-aarch64-static} .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_DEFAULT -t $IMG_NAME_DEFAULT -t $IMG_NAME_AMD64 -f Dockerfile .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_ARM32V7 -t $IMG_NAME_ARM32V7 -f arm.Dockerfile .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_ARM64V8 -t $IMG_NAME_ARM64V8 -f aarch64.Dockerfile .
-          docker push $IMG_NAME_DEFAULT
-          docker push $IMG_NAME_AMD64
-          docker push $IMG_NAME_ARM32V7
-          docker push $IMG_NAME_ARM64V8
-          docker manifest create $IMG_NAME_DEFAULT $IMG_NAME_AMD64 $IMG_NAME_ARM32V7 $IMG_NAME_ARM64V8
-          docker manifest annotate $IMG_NAME_DEFAULT $IMG_NAME_ARM32V7 --os linux --arch arm
-          docker manifest annotate $IMG_NAME_DEFAULT $IMG_NAME_ARM64V8 --os linux --arch arm64
-          docker manifest push $IMG_NAME_DEFAULT
+        uses: docker/build-push-action@v2
+        with:
+          context: ./streampipes-extensions/streampipes-connect-adapters-iiot
+          platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
+          push: true
+          tags: ${{ env.DOCKERHUB_APACHE_REPO }}/connect-adapters-iiot:${{ env.MVN_VERSION }}
+
       - name: Build and Push Docker Image extensions-all-jvm
-        working-directory: ./streampipes-extensions/streampipes-extensions-all-jvm
-        env:
-          IMG_NAME_DEFAULT: ${{ env.DOCKERHUB_APACHE_REPO }}/extensions-all-jvm:${{ env.MVN_VERSION }}
-          IMG_NAME_AMD64: ${{ env.DOCKERHUB_APACHE_REPO }}/extensions-all-jvm:amd64-${{ env.MVN_VERSION }}
-          IMG_NAME_ARM32V7: ${{ env.DOCKERHUB_APACHE_REPO }}/extensions-all-jvm:arm32v7-${{ env.MVN_VERSION }}
-          IMG_NAME_ARM64V8: ${{ env.DOCKERHUB_APACHE_REPO }}/extensions-all-jvm:arm64v8-${{ env.MVN_VERSION }}
-        run: |
-          cp /usr/bin/{qemu-arm-static,qemu-aarch64-static} .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_DEFAULT -t $IMG_NAME_DEFAULT -t $IMG_NAME_AMD64 -f Dockerfile .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_ARM32V7 -t $IMG_NAME_ARM32V7 -f arm.Dockerfile .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_ARM64V8 -t $IMG_NAME_ARM64V8 -f aarch64.Dockerfile .
-          docker push $IMG_NAME_DEFAULT
-          docker push $IMG_NAME_AMD64
-          docker push $IMG_NAME_ARM32V7
-          docker push $IMG_NAME_ARM64V8
-          docker manifest create $IMG_NAME_DEFAULT $IMG_NAME_AMD64 $IMG_NAME_ARM32V7 $IMG_NAME_ARM64V8
-          docker manifest annotate $IMG_NAME_DEFAULT $IMG_NAME_ARM32V7 --os linux --arch arm
-          docker manifest annotate $IMG_NAME_DEFAULT $IMG_NAME_ARM64V8 --os linux --arch arm64
-          docker manifest push $IMG_NAME_DEFAULT
+        uses: docker/build-push-action@v2
+        with:
+          context: ./streampipes-extensions/streampipes-extensions-all-jvm
+          platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
+          push: true
+          tags: ${{ env.DOCKERHUB_APACHE_REPO }}/extensions-all-jvm:${{ env.MVN_VERSION }}
+
       - name: Build and Push Docker Image pipeline-elements-all-flink
-        working-directory: ./streampipes-extensions/streampipes-pipeline-elements-all-flink
-        env:
-          IMG_NAME_DEFAULT: ${{ env.DOCKERHUB_APACHE_REPO }}/pipeline-elements-all-flink:${{ env.MVN_VERSION }}
-          IMG_NAME_AMD64: ${{ env.DOCKERHUB_APACHE_REPO }}/pipeline-elements-all-flink:amd64-${{ env.MVN_VERSION }}
-          IMG_NAME_ARM32V7: ${{ env.DOCKERHUB_APACHE_REPO }}/pipeline-elements-all-flink:arm32v7-${{ env.MVN_VERSION }}
-          IMG_NAME_ARM64V8: ${{ env.DOCKERHUB_APACHE_REPO }}/pipeline-elements-all-flink:arm64v8-${{ env.MVN_VERSION }}
-        run: |
-          cp /usr/bin/{qemu-arm-static,qemu-aarch64-static} .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_DEFAULT -t $IMG_NAME_DEFAULT -t $IMG_NAME_AMD64 -f Dockerfile .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_ARM32V7 -t $IMG_NAME_ARM32V7 -f arm.Dockerfile .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_ARM64V8 -t $IMG_NAME_ARM64V8 -f aarch64.Dockerfile .
-          docker push $IMG_NAME_DEFAULT
-          docker push $IMG_NAME_AMD64
-          docker push $IMG_NAME_ARM32V7
-          docker push $IMG_NAME_ARM64V8
-          docker manifest create $IMG_NAME_DEFAULT $IMG_NAME_AMD64 $IMG_NAME_ARM32V7 $IMG_NAME_ARM64V8
-          docker manifest annotate $IMG_NAME_DEFAULT $IMG_NAME_ARM32V7 --os linux --arch arm
-          docker manifest annotate $IMG_NAME_DEFAULT $IMG_NAME_ARM64V8 --os linux --arch arm64
-          docker manifest push $IMG_NAME_DEFAULT
+        uses: docker/build-push-action@v2
+        with:
+          context: ./streampipes-extensions/streampipes-pipeline-elements-all-flink
+          platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
+          push: true
+          tags: ${{ env.DOCKERHUB_APACHE_REPO }}/pipeline-elements-all-flink:${{ env.MVN_VERSION }}
+
       - name: Build and Push Docker Image pipeline-elements-all-jvm
-        working-directory: ./streampipes-extensions/streampipes-pipeline-elements-all-jvm
-        env:
-          IMG_NAME_DEFAULT: ${{ env.DOCKERHUB_APACHE_REPO }}/pipeline-elements-all-jvm:${{ env.MVN_VERSION }}
-          IMG_NAME_AMD64: ${{ env.DOCKERHUB_APACHE_REPO }}/pipeline-elements-all-jvm:amd64-${{ env.MVN_VERSION }}
-          IMG_NAME_ARM32V7: ${{ env.DOCKERHUB_APACHE_REPO }}/pipeline-elements-all-jvm:arm32v7-${{ env.MVN_VERSION }}
-          IMG_NAME_ARM64V8: ${{ env.DOCKERHUB_APACHE_REPO }}/pipeline-elements-all-jvm:arm64v8-${{ env.MVN_VERSION }}
-        run: |
-          cp /usr/bin/{qemu-arm-static,qemu-aarch64-static} .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_DEFAULT -t $IMG_NAME_DEFAULT -t $IMG_NAME_AMD64 -f Dockerfile .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_ARM32V7 -t $IMG_NAME_ARM32V7 -f arm.Dockerfile .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_ARM64V8 -t $IMG_NAME_ARM64V8 -f aarch64.Dockerfile .
-          docker push $IMG_NAME_DEFAULT
-          docker push $IMG_NAME_AMD64
-          docker push $IMG_NAME_ARM32V7
-          docker push $IMG_NAME_ARM64V8
-          docker manifest create $IMG_NAME_DEFAULT $IMG_NAME_AMD64 $IMG_NAME_ARM32V7 $IMG_NAME_ARM64V8
-          docker manifest annotate $IMG_NAME_DEFAULT $IMG_NAME_ARM32V7 --os linux --arch arm
-          docker manifest annotate $IMG_NAME_DEFAULT $IMG_NAME_ARM64V8 --os linux --arch arm64
-          docker manifest push $IMG_NAME_DEFAULT
+        uses: docker/build-push-action@v2
+        with:
+          context: ./streampipes-extensions/streampipes-pipeline-elements-all-jvm
+          platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
+          push: true
+          tags: ${{ env.DOCKERHUB_APACHE_REPO }}/pipeline-elements-all-jvm:${{ env.MVN_VERSION }}
+
       - name: Build and Push Docker Image sinks-internal-jvm
-        working-directory: ./streampipes-extensions/streampipes-sinks-internal-jvm
-        env:
-          IMG_NAME_DEFAULT: ${{ env.DOCKERHUB_APACHE_REPO }}/sinks-internal-jvm:${{ env.MVN_VERSION }}
-          IMG_NAME_AMD64: ${{ env.DOCKERHUB_APACHE_REPO }}/sinks-internal-jvm:amd64-${{ env.MVN_VERSION }}
-          IMG_NAME_ARM32V7: ${{ env.DOCKERHUB_APACHE_REPO }}/sinks-internal-jvm:arm32v7-${{ env.MVN_VERSION }}
-          IMG_NAME_ARM64V8: ${{ env.DOCKERHUB_APACHE_REPO }}/sinks-internal-jvm:arm64v8-${{ env.MVN_VERSION }}
-        run: |
-          cp /usr/bin/{qemu-arm-static,qemu-aarch64-static} .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_DEFAULT -t $IMG_NAME_DEFAULT -t $IMG_NAME_AMD64 -f Dockerfile .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_ARM32V7 -t $IMG_NAME_ARM32V7 -f arm.Dockerfile .
-          docker build --pull --build-arg BASE_IMAGE=$BASE_IMG_JRE_ARM64V8 -t $IMG_NAME_ARM64V8 -f aarch64.Dockerfile .
-          docker push $IMG_NAME_DEFAULT
-          docker push $IMG_NAME_AMD64
-          docker push $IMG_NAME_ARM32V7
-          docker push $IMG_NAME_ARM64V8
-          docker manifest create $IMG_NAME_DEFAULT $IMG_NAME_AMD64 $IMG_NAME_ARM32V7 $IMG_NAME_ARM64V8
-          docker manifest annotate $IMG_NAME_DEFAULT $IMG_NAME_ARM32V7 --os linux --arch arm
-          docker manifest annotate $IMG_NAME_DEFAULT $IMG_NAME_ARM64V8 --os linux --arch arm64
-          docker manifest push $IMG_NAME_DEFAULT
+        uses: docker/build-push-action@v2
+        with:
+          context: ./streampipes-extensions/streampipes-sinks-internal-jvm
+          platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
+          push: true
+          tags: ${{ env.DOCKERHUB_APACHE_REPO }}/sinks-internal-jvm:${{ env.MVN_VERSION }}
\ No newline at end of file
diff --git a/streampipes-extensions/streampipes-connect-adapters-iiot/Dockerfile b/streampipes-extensions/streampipes-connect-adapters-iiot/Dockerfile
index bc3a66f..e61f390 100644
--- a/streampipes-extensions/streampipes-connect-adapters-iiot/Dockerfile
+++ b/streampipes-extensions/streampipes-connect-adapters-iiot/Dockerfile
@@ -13,8 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ARG BASE_IMAGE=eclipse-temurin:11-jre-focal
-FROM $BASE_IMAGE
+FROM eclipse-temurin:11-jre-focal
 
 ENV CONSUL_LOCATION consul
 
diff --git a/streampipes-extensions/streampipes-connect-adapters/Dockerfile b/streampipes-extensions/streampipes-connect-adapters/Dockerfile
index 9a4647e..8e5b949 100644
--- a/streampipes-extensions/streampipes-connect-adapters/Dockerfile
+++ b/streampipes-extensions/streampipes-connect-adapters/Dockerfile
@@ -13,8 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ARG BASE_IMAGE=adoptopenjdk/openjdk8-openj9:alpine
-FROM $BASE_IMAGE
+FROM eclipse-temurin:11-jre-focal
 
 ENV CONSUL_LOCATION consul
 
diff --git a/streampipes-extensions/streampipes-extensions-all-jvm/Dockerfile b/streampipes-extensions/streampipes-extensions-all-jvm/Dockerfile
index d5250c4..3a4fb44 100644
--- a/streampipes-extensions/streampipes-extensions-all-jvm/Dockerfile
+++ b/streampipes-extensions/streampipes-extensions-all-jvm/Dockerfile
@@ -13,8 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ARG BASE_IMAGE=eclipse-temurin:11-jre-focal
-FROM $BASE_IMAGE
+FROM eclipse-temurin:11-jre-focal
 
 ENV CONSUL_LOCATION consul
 
diff --git a/streampipes-extensions/streampipes-pipeline-elements-all-flink/Dockerfile b/streampipes-extensions/streampipes-pipeline-elements-all-flink/Dockerfile
index 2d0be1a..3e77c29 100644
--- a/streampipes-extensions/streampipes-pipeline-elements-all-flink/Dockerfile
+++ b/streampipes-extensions/streampipes-pipeline-elements-all-flink/Dockerfile
@@ -13,8 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ARG BASE_IMAGE=adoptopenjdk/openjdk8-openj9:alpine
-FROM $BASE_IMAGE
+FROM eclipse-temurin:11-jre-focal
 
 ENV CONSUL_LOCATION consul
 
diff --git a/streampipes-extensions/streampipes-pipeline-elements-all-jvm/Dockerfile b/streampipes-extensions/streampipes-pipeline-elements-all-jvm/Dockerfile
index c657454..8ed35b2 100644
--- a/streampipes-extensions/streampipes-pipeline-elements-all-jvm/Dockerfile
+++ b/streampipes-extensions/streampipes-pipeline-elements-all-jvm/Dockerfile
@@ -13,8 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ARG BASE_IMAGE=eclipse-temurin:11-jre-focal
-FROM $BASE_IMAGE
+FROM eclipse-temurin:11-jre-focal
 
 ENV CONSUL_LOCATION consul
 
diff --git a/streampipes-extensions/streampipes-sinks-internal-jvm/Dockerfile b/streampipes-extensions/streampipes-sinks-internal-jvm/Dockerfile
index ccfeb73..27d1e9c 100644
--- a/streampipes-extensions/streampipes-sinks-internal-jvm/Dockerfile
+++ b/streampipes-extensions/streampipes-sinks-internal-jvm/Dockerfile
@@ -13,8 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ARG BASE_IMAGE=adoptopenjdk/openjdk8-openj9:alpine
-FROM $BASE_IMAGE
+FROM eclipse-temurin:11-jre-focal
 
 ENV CONSUL_LOCATION consul
 
diff --git a/ui/Dockerfile b/ui/Dockerfile
index e869f3c..e89d893 100644
--- a/ui/Dockerfile
+++ b/ui/Dockerfile
@@ -13,8 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ARG BASE_IMAGE=nginx
-FROM $BASE_IMAGE
+FROM nginx
 
 COPY dist/streampipes/ui/ /usr/share/nginx/html/