From e3e3e8512c79812ebb6f70e270b9c86e7e0e2b3a Mon Sep 17 00:00:00 2001 From: duncdrum Date: Sat, 2 Nov 2024 10:52:39 +0100 Subject: [PATCH] [refactor] remove dead code dependencies are part of distroless base image enable experimental image push for testing --- .github/workflows/ci-deploy.yml | 16 ++++++++-------- .../src/main/resources-filtered/Dockerfile | 18 ------------------ 2 files changed, 8 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci-deploy.yml b/.github/workflows/ci-deploy.yml index 94b1ee46c48..6dad561fbf4 100644 --- a/.github/workflows/ci-deploy.yml +++ b/.github/workflows/ci-deploy.yml @@ -60,12 +60,12 @@ jobs: run: mvn -q -Ddocker.tag=release -Ddocker.username=$DOCKER_USERNAME -Ddocker.password=$DOCKER_PASSWORD docker:build docker:push working-directory: ./exist-docker # NOTE (DP): This is for debugging, publishes an experimental image from inside PRs against develop - # - name: Publish experimental images - # if: github.base_ref == 'develop' - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - # DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - # run: mvn -q -Ddocker.tag=experimental -Ddocker.username=$DOCKER_USERNAME -Ddocker.password=$DOCKER_PASSWORD docker:build docker:push - # working-directory: ./exist-docker + - name: Publish experimental images + if: github.base_ref == 'develop' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + run: mvn -q -Ddocker.tag=experimental -Ddocker.username=$DOCKER_USERNAME -Ddocker.password=$DOCKER_PASSWORD docker:build docker:push + working-directory: ./exist-docker diff --git a/exist-docker/src/main/resources-filtered/Dockerfile b/exist-docker/src/main/resources-filtered/Dockerfile index 16887291004..6ef7d5dab95 100644 --- a/exist-docker/src/main/resources-filtered/Dockerfile +++ b/exist-docker/src/main/resources-filtered/Dockerfile @@ -20,26 +20,8 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # -# Use Debian Bullseye (which is the base of gcr.io/distroless/java:17) for additional library dependencies that we need -# FROM debian:bullseye-slim as debian-slim -# RUN apt-get update && apt-get -y dist-upgrade -# RUN apt-get install -y openjdk-17-jre-headless -# RUN apt-get install -y expat fontconfig # Install tools required by FOP - FROM gcr.io/distroless/java17:latest -# Copy over dependencies for Apache FOP, missing from GCR's JRE -# COPY --from=debian-slim /usr/lib/x86_64-linux-gnu/libfreetype.so.6 /usr/lib/x86_64-linux-gnu/libfreetype.so.6 -# COPY --from=debian-slim /usr/lib/x86_64-linux-gnu/liblcms2.so.2 /usr/lib/x86_64-linux-gnu/liblcms2.so.2 -# COPY --from=debian-slim /usr/lib/x86_64-linux-gnu/libpng16.so.16 /usr/lib/x86_64-linux-gnu/libpng16.so.16 -# COPY --from=debian-slim /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 - -# Copy dependencies for Apache Batik (used by Apache FOP to handle SVG rendering) -# COPY --from=debian-slim /etc/fonts /etc/fonts -# COPY --from=debian-slim /lib/x86_64-linux-gnu/libexpat.so.1 /lib/x86_64-linux-gnu/libexpat.so.1 -# COPY --from=debian-slim /usr/share/fontconfig /usr/share/fontconfig -# COPY --from=debian-slim /usr/share/fonts/truetype/dejavu /usr/share/fonts/truetype/dejavu - # Copy eXist-db COPY LICENSE /exist/LICENSE COPY autodeploy /exist/autodeploy