diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml new file mode 100644 index 0000000..f2f5f3f --- /dev/null +++ b/.github/workflows/build-pr.yml @@ -0,0 +1,53 @@ +name: docker pr + +on: + push: + branches-ignore: + - "main" + +env: + IMAGE_FQDN: ghcr.io/eugenmayer/jodconverter + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + 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: Login to GHCR + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ github.token }} + - name: Build and push base + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64 + push: false + target: jodconverter-base + tags: | + ${{ env.IMAGE_FQDN }}:base + - name: Build and push gui + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64 + push: false + target: jodconverter-gui + tags: | + ${{ env.IMAGE_FQDN }}:gui + - name: Build and push rest + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64 + push: false + target: jodconverter-rest + tags: | + ${{ env.IMAGE_FQDN }}:rest diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6650d99..0f16e79 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: build-and-push +name: docker publish on: push: diff --git a/Dockerfile b/Dockerfile index b159887..079d0ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # ---------------------------------- setup our needed libreoffice engaged server with newest glibc # we cannot use the official image since we then cannot have sid and the glibc fix # we could use jre, but would need to ensure we use a jdk variant in development. For OSS we make it easier here -FROM bellsoft/liberica-openjdk-debian:11 as jodconverter-base +FROM bellsoft/liberica-openjre-debian:17 as jodconverter-base RUN apt-get update && apt-get -y install \ apt-transport-https locales-all libpng16-16 libxinerama1 libgl1-mesa-glx libfontconfig1 libfreetype6 libxrender1 \ libxcb-shm0 libxcb-render0 adduser cpio findutils gosu \ @@ -29,7 +29,7 @@ ENTRYPOINT ["/docker-entrypoint.sh"] CMD ["--spring.config.additional-location=optional:/etc/app/"] # ---------------------------------- build our jodconvert builder, so source code with build tools -FROM openjdk:11-jdk as jodconverter-builder +FROM bellsoft/liberica-openjdk-debian:17 as jodconverter-builder RUN apt-get update \ && apt-get -y install git \ && git clone https://github.com/sbraconnier/jodconverter /tmp/jodconverter \