diff --git a/.github/workflows/build-and-push.yaml b/.github/workflows/build-and-push.yaml index 9e35e81fc..55ce430b0 100644 --- a/.github/workflows/build-and-push.yaml +++ b/.github/workflows/build-and-push.yaml @@ -6,6 +6,7 @@ on: branches: - main - "release/**" + - "docker/**" paths: - "Makefile" - "pom.xml" @@ -22,15 +23,25 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 steps: - - name: Install Cosign - uses: sigstore/cosign-installer@v3.5.0 - - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + # Add support for more platforms with QEMU + # https://github.com/docker/setup-qemu-action + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + # https://github.com/docker/setup-buildx-action + with: + platforms: linux/amd64,linux/arm64 + # Sets up docker build command as an alias to docker buildx + install: true + - name: Checkout uses: actions/checkout@v4 with: @@ -47,19 +58,18 @@ jobs: run: | make install - - name: Build images + - name: Build and push images run: | - make build-image - - - name: Push images - run: | - make push-image + make build-image-multiplatform - name: Remove project jars from cached repository run: | rm -rf ~/.m2/repository/org/geoserver find ~/.m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {} + - name: Install Cosign + uses: sigstore/cosign-installer@v3.5.0 + - name: Sign images if: ${{ startsWith(github.ref, 'refs/tags/') }} env: diff --git a/Makefile b/Makefile index 1d7cc24a6..6d432aa4a 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ all: install test build-image TAG=$(shell mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + COSIGN_PASSWORD := $(COSIGN_PASSWORD) COMPOSE_PGCONFIG_OPTIONS ?= -f compose.yml -f catalog-pgconfig.yml COMPOSE_DATADIR_OPTIONS ?= -f compose.yml -f catalog-datadir.yml @@ -30,32 +31,50 @@ install: test: ./mvnw verify -ntp -T4 +.PHONY: build-image +build-image: build-base-images build-image-infrastructure build-image-geoserver + .PHONY: build-base-images build-base-images: + ./mvnw clean package -f src/apps/base-images -DskipTests -T4 && \ + TAG=$(TAG) docker compose -f docker-build/base-images.yml build + +.PHONY: build-image-infrastructure +build-image-infrastructure: + ./mvnw clean package -f src/apps/infrastructure -DskipTests -T4 && \ + TAG=$(TAG) docker compose -f docker-build/infrastructure.yml build + +.PHONY: build-image-geoserver +build-image-geoserver: + ./mvnw clean package -f src/apps/geoserver -DskipTests -T4 && \ + TAG=$(TAG) docker compose -f docker-build/geoserver.yml build + +.PHONY: build-image-multiplatform +build-image-multiplatform: build-base-images-multiplatform build-image-infrastructure-multiplatform build-image-geoserver-multiplatform + +.PHONY: build-base-images-multiplatform +build-base-images-multiplatform: ./mvnw clean package -f src/apps/base-images -DskipTests -T4 && \ COMPOSE_DOCKER_CLI_BUILD=1 \ DOCKER_BUILDKIT=1 \ TAG=$(TAG) \ - docker compose -f docker-build/base-images.yml build + docker compose -f docker-build/base-images-multiplatform.yml build --push -.PHONY: build-image-infrastructure -build-image-infrastructure: +.PHONY: build-image-infrastructure-multiplatform +build-image-infrastructure-multiplatform: ./mvnw clean package -f src/apps/infrastructure -DskipTests -T4 && \ COMPOSE_DOCKER_CLI_BUILD=1 \ DOCKER_BUILDKIT=1 \ TAG=$(TAG) \ - docker compose -f docker-build/infrastructure.yml build + docker compose -f docker-build/infrastructure-multiplatform.yml build --push -.PHONY: build-image-geoserver -build-image-geoserver: +.PHONY: build-image-geoserver-multiplatform +build-image-geoserver-multiplatform: ./mvnw clean package -f src/apps/geoserver -DskipTests -T4 && \ COMPOSE_DOCKER_CLI_BUILD=1 \ DOCKER_BUILDKIT=1 \ TAG=$(TAG) \ - docker compose -f docker-build/geoserver.yml build - -.PHONY: build-image -build-image: build-base-images build-image-infrastructure build-image-geoserver + docker compose -f docker-build/geoserver-multiplatform.yml build --push .PHONY: push-image push-image: diff --git a/README.md b/README.md index 73f2e6b06..154a8ce2b 100644 --- a/README.md +++ b/README.md @@ -141,29 +141,49 @@ which you can also run individually during development depending on your needs. you'd run `make build-image-geoserver` to speed up the process when made a change and want to test the geoserver containers, without having to rebuild the base and infra images. -### Targeted builds +#### Multiplatform (amd64/arm64) images -*GeoServer Cloud*-specific modules source code is under the `src/` directory. +The "build and push" github actions job will create `linux/amd64` and `linux/arm64` multi-platform images by running -When you already have the `2.23.0-CLOUD` GeoServer artifacts, you can choose to only build these projects, either by: +```bash +make build-image-multiplatform +``` + +This target assumes `buildx` is set up as an alias for `docker build` and there's a build runner that supports both platforms. +Building multi-platform images requires pushing to the container registry, so the `build-image-multiplatform` target +will run `docker compose build --push` with the appropriate `*-multiplatform.yml` compose file from the `docker-build` directory. + +If you want to build the multi-platform images yourself: + +* Install QEmu +* Run the following command to create a `buildx` builder: ```bash -$ ./mvnw clean install -f src/ +docker buildx create --name gscloud-builder --driver docker-container --bootstrap --use ``` -Or +In order to push the images to your own dockerhub account, use the `RESPOSITORY` environment variable, for example: + +```bash +REPOSITORY=groldan make build-image-multiplatform +``` + +will build and push `groldan/:` tagged images instead of the default `geoservercloud/:` ones. + + +Finally, to remove the multi-platform builder, run ```bash -$ cd src/ -$ ../mvnw clean install +docker buildx stop gscloud-builder +docker buildx rm gscloud-builder ``` ### Note on custom upstream GeoServer version *GeoServer Cloud* depends on a custom GeoServer branch, `gscloud/gs_version/integration`, which contains patches to upstream GeoServer that have not yet been integrated into the mainstream `main` branch. -Additionally, this branch changes the artifact versions (e.g. from `2.23-SNAPSHOT` to `2.23.0-CLOUD`), to avoid confusing maven if you also work with vanilla GeoServer, and to avoid your IDE downloading the latest `2.23-SNAPSHOT` artifacts from the OsGeo maven repository, overriding your local maven repository ones, and having confusing compilation errors that would require re-building the branch we need. +Additionally, this branch changes the artifact versions (e.g. from `2.26.0` to `2.26.0.0`), to avoid confusing maven if you also work with vanilla GeoServer, and to avoid your IDE downloading the latest `2.23-SNAPSHOT` artifacts from the OsGeo maven repository, overriding your local maven repository ones, and having confusing compilation errors that would require re-building the branch we need. The `gscloud/gs_version/integration` branch is checked out as a submodule on the [camptocamp/geoserver-cloud-geoserver](https://github.com/camptocamp/geoserver-cloud-geoserver) repository, which publishes the custom geoserver maven artifacts to the Github maven package registry. diff --git a/docker-build/.env b/docker-build/.env new file mode 100644 index 000000000..e032e4a91 --- /dev/null +++ b/docker-build/.env @@ -0,0 +1,2 @@ +REPOSITORY=geoservercloud + diff --git a/docker-build/base-images-multiplatform.yml b/docker-build/base-images-multiplatform.yml new file mode 100644 index 000000000..58d728caa --- /dev/null +++ b/docker-build/base-images-multiplatform.yml @@ -0,0 +1,26 @@ +services: + base-image-jre: + extends: + file: templates.yml + service: multi-platform + image: ${REPOSITORY}/gs-cloud-base-jre:${TAG} + build: + context: ../src/apps/base-images/jre/ + + base-image-spring-boot: + extends: + file: templates.yml + service: multi-platform + image: ${REPOSITORY}/gs-cloud-base-spring-boot:${TAG} + depends_on: [base-image-jre] + build: + context: ../src/apps/base-images/spring-boot/ + + base-image-geoserver: + extends: + file: templates.yml + service: multi-platform + image: ${REPOSITORY}/gs-cloud-base-geoserver-image:${TAG} + depends_on: [base-image-spring-boot] + build: + context: ../src/apps/base-images/geoserver/ diff --git a/docker-build/base-images.yml b/docker-build/base-images.yml index d6c62009e..bf51d8a90 100644 --- a/docker-build/base-images.yml +++ b/docker-build/base-images.yml @@ -1,27 +1,26 @@ services: base-image-jre: - image: geoservercloud/gs-cloud-base-jre:${TAG} + extends: + file: templates.yml + service: current-platform + image: ${REPOSITORY}/gs-cloud-base-jre:${TAG} build: - no_cache: true - pull: true context: ../src/apps/base-images/jre/ base-image-spring-boot: - image: geoservercloud/gs-cloud-base-spring-boot:${TAG} + extends: + file: templates.yml + service: current-platform + image: ${REPOSITORY}/gs-cloud-base-spring-boot:${TAG} depends_on: [base-image-jre] build: - no_cache: true - pull: false context: ../src/apps/base-images/spring-boot/ - args: - TAG: ${TAG} base-image-geoserver: - image: geoservercloud/gs-cloud-base-geoserver-image:${TAG} + extends: + file: templates.yml + service: current-platform + image: ${REPOSITORY}/gs-cloud-base-geoserver-image:${TAG} depends_on: [base-image-spring-boot] build: - no_cache: true - pull: false context: ../src/apps/base-images/geoserver/ - args: - TAG: ${TAG} diff --git a/docker-build/geoserver-multiplatform.yml b/docker-build/geoserver-multiplatform.yml new file mode 100644 index 000000000..a1cf5ec3b --- /dev/null +++ b/docker-build/geoserver-multiplatform.yml @@ -0,0 +1,58 @@ +services: + wfs: + extends: + file: templates.yml + service: multi-platform + image: ${REPOSITORY}/geoserver-cloud-wfs:${TAG} + build: + context: ../src/apps/geoserver/wfs/ + + wms: + extends: + file: templates.yml + service: multi-platform + image: ${REPOSITORY}/geoserver-cloud-wms:${TAG} + build: + context: ../src/apps/geoserver/wms/ + + wcs: + extends: + file: templates.yml + service: multi-platform + image: ${REPOSITORY}/geoserver-cloud-wcs:${TAG} + build: + context: ../src/apps/geoserver/wcs/ + + wps: + extends: + file: templates.yml + service: multi-platform + image: ${REPOSITORY}/geoserver-cloud-wps:${TAG} + build: + context: ../src/apps/geoserver/wps/ + + rest: + extends: + file: templates.yml + service: multi-platform + image: ${REPOSITORY}/geoserver-cloud-rest:${TAG} + build: + context: ../src/apps/geoserver/restconfig/ + + webui: + extends: + file: templates.yml + service: multi-platform + image: ${REPOSITORY}/geoserver-cloud-webui:${TAG} + build: + context: ../src/apps/geoserver/webui/ + + gwc: + extends: + file: templates.yml + service: multi-platform + image: ${REPOSITORY}/geoserver-cloud-gwc:${TAG} + build: + context: ../src/apps/geoserver/gwc/ + + \ No newline at end of file diff --git a/docker-build/geoserver.yml b/docker-build/geoserver.yml index 5b8fec745..9f663661b 100644 --- a/docker-build/geoserver.yml +++ b/docker-build/geoserver.yml @@ -1,64 +1,58 @@ services: wfs: - image: geoservercloud/geoserver-cloud-wfs:${TAG} + extends: + file: templates.yml + service: current-platform + image: ${REPOSITORY}/geoserver-cloud-wfs:${TAG} build: - no_cache: true - pull: false context: ../src/apps/geoserver/wfs/ - args: - TAG: ${TAG} wms: - image: geoservercloud/geoserver-cloud-wms:${TAG} + extends: + file: templates.yml + service: current-platform + image: ${REPOSITORY}/geoserver-cloud-wms:${TAG} build: - no_cache: true - pull: false context: ../src/apps/geoserver/wms/ - args: - TAG: ${TAG} wcs: - image: geoservercloud/geoserver-cloud-wcs:${TAG} + extends: + file: templates.yml + service: current-platform + image: ${REPOSITORY}/geoserver-cloud-wcs:${TAG} build: - no_cache: true - pull: false context: ../src/apps/geoserver/wcs/ - args: - TAG: ${TAG} wps: - image: geoservercloud/geoserver-cloud-wps:${TAG} + extends: + file: templates.yml + service: current-platform + image: ${REPOSITORY}/geoserver-cloud-wps:${TAG} build: - no_cache: true - pull: false context: ../src/apps/geoserver/wps/ - args: - TAG: ${TAG} rest: - image: geoservercloud/geoserver-cloud-rest:${TAG} + extends: + file: templates.yml + service: current-platform + image: ${REPOSITORY}/geoserver-cloud-rest:${TAG} build: - no_cache: true - pull: false context: ../src/apps/geoserver/restconfig/ - args: - TAG: ${TAG} webui: - image: geoservercloud/geoserver-cloud-webui:${TAG} + extends: + file: templates.yml + service: current-platform + image: ${REPOSITORY}/geoserver-cloud-webui:${TAG} build: - no_cache: true - pull: false context: ../src/apps/geoserver/webui/ - args: - TAG: ${TAG} gwc: - image: geoservercloud/geoserver-cloud-gwc:${TAG} + extends: + file: templates.yml + service: current-platform + image: ${REPOSITORY}/geoserver-cloud-gwc:${TAG} build: - no_cache: true - pull: false context: ../src/apps/geoserver/gwc/ - args: - TAG: ${TAG} + \ No newline at end of file diff --git a/docker-build/infrastructure-multiplatform.yml b/docker-build/infrastructure-multiplatform.yml new file mode 100644 index 000000000..b3eb1ad60 --- /dev/null +++ b/docker-build/infrastructure-multiplatform.yml @@ -0,0 +1,32 @@ +services: + discovery: + extends: + file: templates.yml + service: multi-platform + image: ${REPOSITORY}/geoserver-cloud-discovery:${TAG} + build: + context: ../src/apps/infrastructure/discovery/ + + config: + extends: + file: templates.yml + service: multi-platform + image: ${REPOSITORY}/geoserver-cloud-config:${TAG} + build: + context: ../src/apps/infrastructure/config/ + + admin: + extends: + file: templates.yml + service: multi-platform + image: ${REPOSITORY}/geoserver-cloud-admin-server:${TAG} + build: + context: ../src/apps/infrastructure/admin/ + + gateway: + extends: + file: templates.yml + service: multi-platform + image: ${REPOSITORY}/geoserver-cloud-gateway:${TAG} + build: + context: ../src/apps/infrastructure/gateway/ diff --git a/docker-build/infrastructure.yml b/docker-build/infrastructure.yml index ce1b03c39..35138daad 100644 --- a/docker-build/infrastructure.yml +++ b/docker-build/infrastructure.yml @@ -1,32 +1,32 @@ services: discovery: - image: geoservercloud/geoserver-cloud-discovery:${TAG} + extends: + file: templates.yml + service: current-platform + image: ${REPOSITORY}/geoserver-cloud-discovery:${TAG} build: - no_cache: true context: ../src/apps/infrastructure/discovery/ - args: - TAG: ${TAG} config: - image: geoservercloud/geoserver-cloud-config:${TAG} + extends: + file: templates.yml + service: current-platform + image: ${REPOSITORY}/geoserver-cloud-config:${TAG} build: - no_cache: true context: ../src/apps/infrastructure/config/ - args: - TAG: ${TAG} admin: - image: geoservercloud/geoserver-cloud-admin-server:${TAG} + extends: + file: templates.yml + service: current-platform + image: ${REPOSITORY}/geoserver-cloud-admin-server:${TAG} build: - no_cache: true context: ../src/apps/infrastructure/admin/ - args: - TAG: ${TAG} gateway: - image: geoservercloud/geoserver-cloud-gateway:${TAG} + extends: + file: templates.yml + service: current-platform + image: ${REPOSITORY}/geoserver-cloud-gateway:${TAG} build: - no_cache: true context: ../src/apps/infrastructure/gateway/ - args: - TAG: ${TAG} diff --git a/docker-build/templates.yml b/docker-build/templates.yml new file mode 100644 index 000000000..f3a42495a --- /dev/null +++ b/docker-build/templates.yml @@ -0,0 +1,22 @@ +services: + current-platform: + build: + no_cache: true + pull: true + context: override-me + args: + TAG: ${TAG} + REPOSITORY: ${REPOSITORY} + + multi-platform: + build: + no_cache: true + pull: true + context: override-me + platforms: + - linux/amd64 + - linux/arm64 + args: + TAG: ${TAG} + REPOSITORY: ${REPOSITORY} + \ No newline at end of file diff --git a/src/apps/base-images/geoserver/Dockerfile b/src/apps/base-images/geoserver/Dockerfile index fd8c90713..be7c14730 100644 --- a/src/apps/base-images/geoserver/Dockerfile +++ b/src/apps/base-images/geoserver/Dockerfile @@ -1,5 +1,7 @@ +ARG REPOSITORY=geoservercloud ARG TAG=latest -FROM geoservercloud/gs-cloud-base-jre:$TAG AS builder + +FROM $REPOSITORY/gs-cloud-base-jre:$TAG AS builder ARG JAR_FILE=target/gs-cloud-*-bin.jar RUN apt update && apt install -y --no-install-recommends unzip @@ -13,7 +15,7 @@ RUN java -Djarmode=layertools -jar application.jar extract # rm /tmp/YourKit-JavaProfiler-2023.9-docker.zip ########## -FROM geoservercloud/gs-cloud-base-spring-boot:$TAG +FROM $REPOSITORY/gs-cloud-base-spring-boot:$TAG # init RUN apt update \ diff --git a/src/apps/base-images/spring-boot/Dockerfile b/src/apps/base-images/spring-boot/Dockerfile index eb2f8e73d..dba590c12 100644 --- a/src/apps/base-images/spring-boot/Dockerfile +++ b/src/apps/base-images/spring-boot/Dockerfile @@ -1,5 +1,8 @@ +ARG REPOSITORY=geoservercloud ARG TAG=latest -FROM geoservercloud/gs-cloud-base-jre:$TAG AS builder + +FROM $REPOSITORY/gs-cloud-base-jre:$TAG AS builder + ARG JAR_FILE=target/gs-cloud-*-bin.jar COPY ${JAR_FILE} application.jar @@ -7,7 +10,7 @@ COPY ${JAR_FILE} application.jar RUN java -Djarmode=layertools -jar application.jar extract ########## -FROM geoservercloud/gs-cloud-base-jre:$TAG +FROM $REPOSITORY/gs-cloud-base-jre:$TAG COPY target/config/ /etc/geoserver/ diff --git a/src/apps/geoserver/gwc/Dockerfile b/src/apps/geoserver/gwc/Dockerfile index 0d942b6ba..851d7cbb6 100644 --- a/src/apps/geoserver/gwc/Dockerfile +++ b/src/apps/geoserver/gwc/Dockerfile @@ -1,5 +1,7 @@ +ARG REPOSITORY=geoservercloud ARG TAG=latest -FROM geoservercloud/gs-cloud-base-jre:$TAG as builder + +FROM $REPOSITORY/gs-cloud-base-jre:$TAG as builder ARG JAR_FILE=target/gs-cloud-*-bin.jar @@ -8,7 +10,7 @@ COPY ${JAR_FILE} application.jar RUN java -Djarmode=layertools -jar application.jar extract ########## -FROM geoservercloud/gs-cloud-base-geoserver-image:$TAG +FROM $REPOSITORY/gs-cloud-base-geoserver-image:$TAG # WORKDIR already set to /opt/app/bin diff --git a/src/apps/geoserver/restconfig/Dockerfile b/src/apps/geoserver/restconfig/Dockerfile index 0d942b6ba..851d7cbb6 100644 --- a/src/apps/geoserver/restconfig/Dockerfile +++ b/src/apps/geoserver/restconfig/Dockerfile @@ -1,5 +1,7 @@ +ARG REPOSITORY=geoservercloud ARG TAG=latest -FROM geoservercloud/gs-cloud-base-jre:$TAG as builder + +FROM $REPOSITORY/gs-cloud-base-jre:$TAG as builder ARG JAR_FILE=target/gs-cloud-*-bin.jar @@ -8,7 +10,7 @@ COPY ${JAR_FILE} application.jar RUN java -Djarmode=layertools -jar application.jar extract ########## -FROM geoservercloud/gs-cloud-base-geoserver-image:$TAG +FROM $REPOSITORY/gs-cloud-base-geoserver-image:$TAG # WORKDIR already set to /opt/app/bin diff --git a/src/apps/geoserver/wcs/Dockerfile b/src/apps/geoserver/wcs/Dockerfile index 0d942b6ba..851d7cbb6 100644 --- a/src/apps/geoserver/wcs/Dockerfile +++ b/src/apps/geoserver/wcs/Dockerfile @@ -1,5 +1,7 @@ +ARG REPOSITORY=geoservercloud ARG TAG=latest -FROM geoservercloud/gs-cloud-base-jre:$TAG as builder + +FROM $REPOSITORY/gs-cloud-base-jre:$TAG as builder ARG JAR_FILE=target/gs-cloud-*-bin.jar @@ -8,7 +10,7 @@ COPY ${JAR_FILE} application.jar RUN java -Djarmode=layertools -jar application.jar extract ########## -FROM geoservercloud/gs-cloud-base-geoserver-image:$TAG +FROM $REPOSITORY/gs-cloud-base-geoserver-image:$TAG # WORKDIR already set to /opt/app/bin diff --git a/src/apps/geoserver/webui/Dockerfile b/src/apps/geoserver/webui/Dockerfile index 0d942b6ba..851d7cbb6 100644 --- a/src/apps/geoserver/webui/Dockerfile +++ b/src/apps/geoserver/webui/Dockerfile @@ -1,5 +1,7 @@ +ARG REPOSITORY=geoservercloud ARG TAG=latest -FROM geoservercloud/gs-cloud-base-jre:$TAG as builder + +FROM $REPOSITORY/gs-cloud-base-jre:$TAG as builder ARG JAR_FILE=target/gs-cloud-*-bin.jar @@ -8,7 +10,7 @@ COPY ${JAR_FILE} application.jar RUN java -Djarmode=layertools -jar application.jar extract ########## -FROM geoservercloud/gs-cloud-base-geoserver-image:$TAG +FROM $REPOSITORY/gs-cloud-base-geoserver-image:$TAG # WORKDIR already set to /opt/app/bin diff --git a/src/apps/geoserver/wfs/Dockerfile b/src/apps/geoserver/wfs/Dockerfile index 0d942b6ba..851d7cbb6 100644 --- a/src/apps/geoserver/wfs/Dockerfile +++ b/src/apps/geoserver/wfs/Dockerfile @@ -1,5 +1,7 @@ +ARG REPOSITORY=geoservercloud ARG TAG=latest -FROM geoservercloud/gs-cloud-base-jre:$TAG as builder + +FROM $REPOSITORY/gs-cloud-base-jre:$TAG as builder ARG JAR_FILE=target/gs-cloud-*-bin.jar @@ -8,7 +10,7 @@ COPY ${JAR_FILE} application.jar RUN java -Djarmode=layertools -jar application.jar extract ########## -FROM geoservercloud/gs-cloud-base-geoserver-image:$TAG +FROM $REPOSITORY/gs-cloud-base-geoserver-image:$TAG # WORKDIR already set to /opt/app/bin diff --git a/src/apps/geoserver/wms/Dockerfile b/src/apps/geoserver/wms/Dockerfile index 0d942b6ba..851d7cbb6 100644 --- a/src/apps/geoserver/wms/Dockerfile +++ b/src/apps/geoserver/wms/Dockerfile @@ -1,5 +1,7 @@ +ARG REPOSITORY=geoservercloud ARG TAG=latest -FROM geoservercloud/gs-cloud-base-jre:$TAG as builder + +FROM $REPOSITORY/gs-cloud-base-jre:$TAG as builder ARG JAR_FILE=target/gs-cloud-*-bin.jar @@ -8,7 +10,7 @@ COPY ${JAR_FILE} application.jar RUN java -Djarmode=layertools -jar application.jar extract ########## -FROM geoservercloud/gs-cloud-base-geoserver-image:$TAG +FROM $REPOSITORY/gs-cloud-base-geoserver-image:$TAG # WORKDIR already set to /opt/app/bin diff --git a/src/apps/geoserver/wps/Dockerfile b/src/apps/geoserver/wps/Dockerfile index 0d942b6ba..851d7cbb6 100644 --- a/src/apps/geoserver/wps/Dockerfile +++ b/src/apps/geoserver/wps/Dockerfile @@ -1,5 +1,7 @@ +ARG REPOSITORY=geoservercloud ARG TAG=latest -FROM geoservercloud/gs-cloud-base-jre:$TAG as builder + +FROM $REPOSITORY/gs-cloud-base-jre:$TAG as builder ARG JAR_FILE=target/gs-cloud-*-bin.jar @@ -8,7 +10,7 @@ COPY ${JAR_FILE} application.jar RUN java -Djarmode=layertools -jar application.jar extract ########## -FROM geoservercloud/gs-cloud-base-geoserver-image:$TAG +FROM $REPOSITORY/gs-cloud-base-geoserver-image:$TAG # WORKDIR already set to /opt/app/bin diff --git a/src/apps/infrastructure/admin/Dockerfile b/src/apps/infrastructure/admin/Dockerfile index 09466ba45..2e6762f69 100644 --- a/src/apps/infrastructure/admin/Dockerfile +++ b/src/apps/infrastructure/admin/Dockerfile @@ -1,5 +1,7 @@ +ARG REPOSITORY=geoservercloud ARG TAG=latest -FROM geoservercloud/gs-cloud-base-jre:$TAG AS builder + +FROM $REPOSITORY/gs-cloud-base-jre:$TAG AS builder ARG JAR_FILE=target/gs-cloud-*-bin.jar COPY ${JAR_FILE} application.jar @@ -7,7 +9,7 @@ COPY ${JAR_FILE} application.jar RUN java -Djarmode=layertools -jar application.jar extract ########## -FROM geoservercloud/gs-cloud-base-spring-boot:$TAG +FROM $REPOSITORY/gs-cloud-base-spring-boot:$TAG # WORKDIR already set to /opt/app/bin diff --git a/src/apps/infrastructure/config/Dockerfile b/src/apps/infrastructure/config/Dockerfile index 17d3ef2e1..0c1a0e3fb 100644 --- a/src/apps/infrastructure/config/Dockerfile +++ b/src/apps/infrastructure/config/Dockerfile @@ -1,5 +1,7 @@ +ARG REPOSITORY=geoservercloud ARG TAG=latest -FROM geoservercloud/gs-cloud-base-jre:$TAG AS builder + +FROM $REPOSITORY/gs-cloud-base-jre:$TAG AS builder ARG JAR_FILE=target/gs-cloud-*-bin.jar COPY ${JAR_FILE} application.jar @@ -7,7 +9,7 @@ COPY ${JAR_FILE} application.jar RUN java -Djarmode=layertools -jar application.jar extract ########## -FROM geoservercloud/gs-cloud-base-spring-boot:$TAG +FROM $REPOSITORY/gs-cloud-base-spring-boot:$TAG # WORKDIR already set to /opt/app/bin diff --git a/src/apps/infrastructure/discovery/Dockerfile b/src/apps/infrastructure/discovery/Dockerfile index 99ea6199c..d16b5892c 100644 --- a/src/apps/infrastructure/discovery/Dockerfile +++ b/src/apps/infrastructure/discovery/Dockerfile @@ -1,5 +1,7 @@ +ARG REPOSITORY=geoservercloud ARG TAG=latest -FROM geoservercloud/gs-cloud-base-jre:$TAG AS builder + +FROM $REPOSITORY/gs-cloud-base-jre:$TAG AS builder ARG JAR_FILE=target/gs-cloud-*-bin.jar COPY ${JAR_FILE} application.jar @@ -7,7 +9,7 @@ COPY ${JAR_FILE} application.jar RUN java -Djarmode=layertools -jar application.jar extract ########## -FROM geoservercloud/gs-cloud-base-spring-boot:$TAG +FROM $REPOSITORY/gs-cloud-base-spring-boot:$TAG # WORKDIR already set to /opt/app/bin diff --git a/src/apps/infrastructure/gateway/Dockerfile b/src/apps/infrastructure/gateway/Dockerfile index 99ea6199c..d16b5892c 100644 --- a/src/apps/infrastructure/gateway/Dockerfile +++ b/src/apps/infrastructure/gateway/Dockerfile @@ -1,5 +1,7 @@ +ARG REPOSITORY=geoservercloud ARG TAG=latest -FROM geoservercloud/gs-cloud-base-jre:$TAG AS builder + +FROM $REPOSITORY/gs-cloud-base-jre:$TAG AS builder ARG JAR_FILE=target/gs-cloud-*-bin.jar COPY ${JAR_FILE} application.jar @@ -7,7 +9,7 @@ COPY ${JAR_FILE} application.jar RUN java -Djarmode=layertools -jar application.jar extract ########## -FROM geoservercloud/gs-cloud-base-spring-boot:$TAG +FROM $REPOSITORY/gs-cloud-base-spring-boot:$TAG # WORKDIR already set to /opt/app/bin