From 5624575b08a80374208a5d593ecf4ba6ac3a5aef Mon Sep 17 00:00:00 2001 From: "Denis N. Antonioli" Date: Thu, 12 Jan 2023 17:47:30 -0800 Subject: [PATCH 1/2] 1252: Use eclipse-temurin:17-jre-jammy and generate both amd64 and arm64 images --- .github/workflows/ci.yml | 17 +++++++++++------ Dockerfile | 14 +++++++++----- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2b969b1c..4dbeb9e66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -177,6 +177,10 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - name: Docker meta id: meta uses: docker/metadata-action@v4 @@ -184,18 +188,18 @@ jobs: # list of Docker images to use as base name for tags images: | ${{ github.repository }} - ghcr.io/${{ github.repository }} + ghcr.io/${{ github.repository }} # generate Docker tags based on the following events/attributes tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} type=sha - - name: Log into Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Log into Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Log in to GitHub Docker Registry uses: docker/login-action@v2 with: @@ -211,3 +215,4 @@ jobs: PLANTUML_VERSION=${{ github.event.ref }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + platforms: linux/amd64,linux/arm64 diff --git a/Dockerfile b/Dockerfile index bf85afd16..2d74e5f12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,17 +10,21 @@ RUN wget \ "https://github.com/plantuml/plantuml/releases/download/${PLANTUML_VERSION}/plantuml-${PLANTUML_VERSION#?}.jar" \ -O /opt/plantuml.jar -FROM openjdk:17-alpine +FROM eclipse-temurin:17-jre-jammy ENV LANG en_US.UTF-8 -RUN apk add --no-cache \ - graphviz \ - ttf-dejavu +RUN apt-get update \ + && apt-get install --no-install-recommends -y \ + graphviz \ + fonts-dejavu \ + && apt-get autoremove \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* COPY --from=loader /opt/plantuml.jar /opt/plantuml.jar WORKDIR /data ENTRYPOINT ["java", "-jar", "/opt/plantuml.jar"] -CMD ["-version"] \ No newline at end of file +CMD ["-version"] From f067d71b2890c80cb4cdb06336e25f92036f4dcc Mon Sep 17 00:00:00 2001 From: "Denis N. Antonioli" Date: Thu, 12 Jan 2023 21:22:15 -0800 Subject: [PATCH 2/2] spaces --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4dbeb9e66..855db54c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -188,18 +188,18 @@ jobs: # list of Docker images to use as base name for tags images: | ${{ github.repository }} - ghcr.io/${{ github.repository }} + ghcr.io/${{ github.repository }} # generate Docker tags based on the following events/attributes tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} type=sha - - name: Log into Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Log into Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Log in to GitHub Docker Registry uses: docker/login-action@v2 with: