Skip to content

Commit

Permalink
Backport of Reference hashicorp/consul instead of consul for Docker i…
Browse files Browse the repository at this point in the history
…mage into release/1.13.x (#17917)

* backport of commit d490377

* Reference hashicorp/consul instead of consul for Docker image (#17914)

* Reference hashicorp/consul instead of consul for Docker image

* Update Make targets that pull consul directly

---------

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>
  • Loading branch information
1 parent 470507a commit 755306b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:
GOTESTSUM_VERSION: "1.9.0"
CONSUL_BINARY_UPLOAD_NAME: consul-bin
# strip the hashicorp/ off the front of github.repository for consul
CONSUL_LATEST_IMAGE_NAME: ${{ endsWith(github.repository, '-enterprise') && github.repository || 'consul' }}
CONSUL_LATEST_IMAGE_NAME: ${{ github.repository }}

jobs:
setup:
Expand Down
6 changes: 3 additions & 3 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ dev-build:

dev-docker: linux dev-build
@echo "Pulling consul container image - $(CONSUL_IMAGE_VERSION)"
@docker pull consul:$(CONSUL_IMAGE_VERSION) >/dev/null
@docker pull hashicorp/consul:$(CONSUL_IMAGE_VERSION) >/dev/null
@echo "Building Consul Development container - $(CONSUL_DEV_IMAGE)"
@# 'consul:local' tag is needed to run the integration tests
@# 'consul-dev:latest' is needed by older workflows
Expand All @@ -171,7 +171,7 @@ remote-docker: check-remote-dev-image-env
$(MAKE) GOARCH=amd64 linux
$(MAKE) GOARCH=arm64 linux
@echo "Pulling consul container image - $(CONSUL_IMAGE_VERSION)"
@docker pull consul:$(CONSUL_IMAGE_VERSION) >/dev/null
@docker pull hashicorp/consul:$(CONSUL_IMAGE_VERSION) >/dev/null
@echo "Building and Pushing Consul Development container - $(REMOTE_DEV_IMAGE)"
@docker buildx use default && docker buildx build -t '$(REMOTE_DEV_IMAGE)' \
--platform linux/amd64,linux/arm64 \
Expand All @@ -183,7 +183,7 @@ remote-docker: check-remote-dev-image-env
# should only run in CI and not locally.
ci.dev-docker:
@echo "Pulling consul container image - $(CONSUL_IMAGE_VERSION)"
@docker pull consul:$(CONSUL_IMAGE_VERSION) >/dev/null
@docker pull hashicorp/consul:$(CONSUL_IMAGE_VERSION) >/dev/null
@echo "Building Consul Development container - $(CI_DEV_DOCKER_IMAGE_NAME)"
@docker build $(NOCACHE) $(QUIET) -t '$(CI_DEV_DOCKER_NAMESPACE)/$(CI_DEV_DOCKER_IMAGE_NAME):$(GIT_COMMIT)' \
--build-arg CONSUL_IMAGE_VERSION=$(CONSUL_IMAGE_VERSION) \
Expand Down
2 changes: 1 addition & 1 deletion build-support/docker/Consul-Dev-Multiarch.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG CONSUL_IMAGE_VERSION=latest
FROM consul:${CONSUL_IMAGE_VERSION}
FROM hashicorp/consul:${CONSUL_IMAGE_VERSION}
RUN apk update && apk add iptables
ARG TARGETARCH
COPY linux_${TARGETARCH}/consul /bin/consul
2 changes: 1 addition & 1 deletion build-support/docker/Consul-Dev.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG CONSUL_IMAGE_VERSION=latest
FROM consul:${CONSUL_IMAGE_VERSION}
FROM hashicorp/consul:${CONSUL_IMAGE_VERSION}
RUN apk update && apk add iptables
COPY consul /bin/consul
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

package node

const consulImage = "consul"
const consulImage = "hashicorp/consul"
4 changes: 2 additions & 2 deletions website/content/docs/k8s/installation/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ metadata:
spec:
containers:
- name: example
image: 'consul:latest'
image: 'hashicorp/consul:latest'
env:
- name: HOST_IP
valueFrom:
Expand Down Expand Up @@ -345,7 +345,7 @@ spec:
spec:
containers:
- name: example
image: 'consul:latest'
image: 'hashicorp/consul:latest'
env:
- name: HOST_IP
valueFrom:
Expand Down

0 comments on commit 755306b

Please sign in to comment.