From 40cc019a51c84e76e0e702b1554191ced7e24e9a Mon Sep 17 00:00:00 2001 From: Julien Neuhart Date: Fri, 27 Aug 2021 19:09:15 +0200 Subject: [PATCH] fix: typo Docker Registry -> Docker Repository --- .github/workflows/continuous_delivery.yml | 2 +- Makefile | 18 +++++++++--------- README.md | 2 +- build/Dockerfile.cloudrun | 4 ++-- scripts/release.sh | 20 ++++++++++---------- test/Dockerfile | 4 ++-- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/continuous_delivery.yml b/.github/workflows/continuous_delivery.yml index 7f7b44ee..dae19f1f 100644 --- a/.github/workflows/continuous_delivery.yml +++ b/.github/workflows/continuous_delivery.yml @@ -24,4 +24,4 @@ jobs: - name: Build and push Docker image run: | make release GOTENBERG_VERSION=${{ github.event.release.tag_name }} - make release GOTENBERG_VERSION=${{ github.event.release.tag_name }} DOCKER_REGISTRY=thecodingmachine + make release GOTENBERG_VERSION=${{ github.event.release.tag_name }} DOCKER_REPOSITORY=thecodingmachine diff --git a/Makefile b/Makefile index c6255cac..3ac3302a 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ help: ## Show the help it: build build-tests ## Initialize the development environment GOLANG_VERSION=1.17 -DOCKER_REGISTRY=gotenberg +DOCKER_REPOSITORY=gotenberg GOTENBERG_VERSION=snapshot GOTENBERG_USER_GID=1001 GOTENBERG_USER_UID=1001 @@ -21,7 +21,7 @@ build: ## Build the Gotenberg's Docker image --build-arg GOTENBERG_USER_GID=$(GOTENBERG_USER_GID) \ --build-arg GOTENBERG_USER_UID=$(GOTENBERG_USER_UID) \ --build-arg PDFTK_VERSION=$(PDFTK_VERSION) \ - -t $(DOCKER_REGISTRY)/gotenberg:$(GOTENBERG_VERSION) \ + -t $(DOCKER_REPOSITORY)/gotenberg:$(GOTENBERG_VERSION) \ -f build/Dockerfile . GOTENBERG_GRACEFUL_SHUTDOWN_DURATION=30s @@ -57,7 +57,7 @@ PDFENGINES_DISABLE_ROUTES=false run: ## Start a Gotenberg container docker run --rm -it \ -p $(API_PORT):$(API_PORT) \ - $(DOCKER_REGISTRY)/gotenberg:$(GOTENBERG_VERSION) \ + $(DOCKER_REPOSITORY)/gotenberg:$(GOTENBERG_VERSION) \ gotenberg \ --gotenberg-graceful-shutdown-duration=$(GOTENBERG_GRACEFUL_SHUTDOWN_DURATION) \ --api-port=$(API_PORT) \ @@ -92,24 +92,24 @@ run: ## Start a Gotenberg container build-tests: ## Build the tests' Docker image docker build \ --build-arg GOLANG_VERSION=$(GOLANG_VERSION) \ - --build-arg DOCKER_REGISTRY=$(DOCKER_REGISTRY) \ + --build-arg DOCKER_REPOSITORY=$(DOCKER_REPOSITORY) \ --build-arg GOTENBERG_VERSION=$(GOTENBERG_VERSION) \ --build-arg GOLANGCI_LINT_VERSION=$(GOLANGCI_LINT_VERSION) \ - -t $(DOCKER_REGISTRY)/gotenberg:$(GOTENBERG_VERSION)-tests \ + -t $(DOCKER_REPOSITORY)/gotenberg:$(GOTENBERG_VERSION)-tests \ -f test/Dockerfile . .PHONY: tests tests: ## Start the testing environment docker run --rm -it \ -v $(PWD):/tests \ - $(DOCKER_REGISTRY)/gotenberg:$(GOTENBERG_VERSION)-tests \ + $(DOCKER_REPOSITORY)/gotenberg:$(GOTENBERG_VERSION)-tests \ bash .PHONY: tests-once tests-once: ## Run the tests once (prefer the "tests" command while developing) docker run --rm \ -v $(PWD):/tests \ - $(DOCKER_REGISTRY)/gotenberg:$(GOTENBERG_VERSION)-tests \ + $(DOCKER_REPOSITORY)/gotenberg:$(GOTENBERG_VERSION)-tests \ gotest .PHONY: fmt @@ -123,11 +123,11 @@ godoc: ## Run a webserver with Gotenberg godoc (go get golang.org/x/tools/cmd/go godoc -http=:6060 .PHONY: release -release: ## Build the Gotenberg's Docker image for linux/amd64 and linux/arm64 platforms, then push it to a Docker Registry +release: ## Build the Gotenberg's Docker image for linux/amd64 and linux/arm64 platforms, then push it to a Docker repository ./scripts/release.sh \ $(GOLANG_VERSION) \ $(GOTENBERG_VERSION) \ $(GOTENBERG_USER_GID) \ $(GOTENBERG_USER_UID) \ $(PDFTK_VERSION) \ - $(DOCKER_REGISTRY) + $(DOCKER_REPOSITORY) diff --git a/README.md b/README.md index 08553b0f..6a163f78 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Open a terminal and run the following command: docker run --rm -p 3000:3000 gotenberg/gotenberg:7 ``` -Alternatively, using the historic Docker registry from our sponsor [TheCodingMachine](https://www.thecodingmachine.com): +Alternatively, using the historic Docker repository from our sponsor [TheCodingMachine](https://www.thecodingmachine.com): ``` docker run --rm -p 3000:3000 thecodingmachine/gotenberg:7 diff --git a/build/Dockerfile.cloudrun b/build/Dockerfile.cloudrun index 722e879a..c1ccf6df 100644 --- a/build/Dockerfile.cloudrun +++ b/build/Dockerfile.cloudrun @@ -1,9 +1,9 @@ # Note: ARG instructions do not create additional layers. # Instead, next layers will concatenate them. -ARG DOCKER_REGISTRY +ARG DOCKER_REPOSITORY ARG GOTENBERG_VERSION -FROM $DOCKER_REGISTRY/gotenberg:$GOTENBERG_VERSION +FROM $DOCKER_REPOSITORY/gotenberg:$GOTENBERG_VERSION USER root diff --git a/scripts/release.sh b/scripts/release.sh index d7a612ca..196ef61a 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -7,7 +7,7 @@ GOTENBERG_VERSION="$2" GOTENBERG_USER_GID="$3" GOTENBERG_USER_UID="$4" PDFTK_VERSION="$5" -DOCKER_REGISTRY="$6" +DOCKER_REPOSITORY="$6" GOTENBERG_VERSION="${GOTENBERG_VERSION//v}" SEMVER=( ${GOTENBERG_VERSION//./ } ) @@ -26,22 +26,22 @@ docker buildx build \ --build-arg PDFTK_VERSION="$PDFTK_VERSION" \ --platform linux/amd64 \ --platform linux/arm64 \ - -t "$DOCKER_REGISTRY/gotenberg:latest" \ - -t "$DOCKER_REGISTRY/gotenberg:${SEMVER[0]}" \ - -t "$DOCKER_REGISTRY/gotenberg:${SEMVER[0]}.${SEMVER[1]}" \ - -t "$DOCKER_REGISTRY/gotenberg:${SEMVER[0]}.${SEMVER[1]}.${SEMVER[2]}" \ + -t "$DOCKER_REPOSITORY/gotenberg:latest" \ + -t "$DOCKER_REPOSITORY/gotenberg:${SEMVER[0]}" \ + -t "$DOCKER_REPOSITORY/gotenberg:${SEMVER[0]}.${SEMVER[1]}" \ + -t "$DOCKER_REPOSITORY/gotenberg:${SEMVER[0]}.${SEMVER[1]}.${SEMVER[2]}" \ --push \ -f build/Dockerfile . # Cloud Run variant. docker buildx build \ - --build-arg DOCKER_REGISTRY="$DOCKER_REGISTRY" \ + --build-arg DOCKER_REPOSITORY="$DOCKER_REPOSITORY" \ --build-arg GOTENBERG_VERSION="$GOTENBERG_VERSION" \ --platform linux/amd64 \ --platform linux/arm64 \ - -t "$DOCKER_REGISTRY/gotenberg:latest-cloudrun" \ - -t "$DOCKER_REGISTRY/gotenberg:${SEMVER[0]}-cloudrun" \ - -t "$DOCKER_REGISTRY/gotenberg:${SEMVER[0]}.${SEMVER[1]}-cloudrun" \ - -t "$DOCKER_REGISTRY/gotenberg:${SEMVER[0]}.${SEMVER[1]}.${SEMVER[2]}-cloudrun" \ + -t "$DOCKER_REPOSITORY/gotenberg:latest-cloudrun" \ + -t "$DOCKER_REPOSITORY/gotenberg:${SEMVER[0]}-cloudrun" \ + -t "$DOCKER_REPOSITORY/gotenberg:${SEMVER[0]}.${SEMVER[1]}-cloudrun" \ + -t "$DOCKER_REPOSITORY/gotenberg:${SEMVER[0]}.${SEMVER[1]}.${SEMVER[2]}-cloudrun" \ --push \ -f build/Dockerfile.cloudrun . \ No newline at end of file diff --git a/test/Dockerfile b/test/Dockerfile index 9762ac94..74568541 100644 --- a/test/Dockerfile +++ b/test/Dockerfile @@ -1,5 +1,5 @@ ARG GOLANG_VERSION -ARG DOCKER_REGISTRY +ARG DOCKER_REPOSITORY ARG GOTENBERG_VERSION ARG GOLANGCI_LINT_VERSION @@ -7,7 +7,7 @@ FROM golang:$GOLANG_VERSION-stretch as golang # We're extending the Gotenberg's Docker image because our code relies on external # dependencies like Google Chrome, LibreOffice, etc. -FROM $DOCKER_REGISTRY/gotenberg:$GOTENBERG_VERSION +FROM $DOCKER_REPOSITORY/gotenberg:$GOTENBERG_VERSION USER root