Skip to content

Commit

Permalink
Reference hashicorp/consul instead of consul for Docker image (#17914)
Browse files Browse the repository at this point in the history
* Reference hashicorp/consul instead of consul for Docker image

* Update Make targets that pull consul directly
  • Loading branch information
nathancoleman authored Jun 27, 2023
1 parent 3368f14 commit f787088
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ dev-build:

dev-docker-dbg: 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 - $(CONSUL_DEV_IMAGE)"
@# 'consul-dbg:local' tag is needed to run the integration tests
@# 'consul-dev:latest' is needed by older workflows
Expand All @@ -183,7 +183,7 @@ dev-docker-dbg: dev-docker

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 @@ -205,7 +205,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)"
@if ! docker buildx inspect consul-builder; then \
docker buildx create --name consul-builder --driver docker-container --bootstrap; \
Expand All @@ -222,7 +222,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
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: MPL-2.0

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
Expand Up @@ -2,6 +2,6 @@
# SPDX-License-Identifier: MPL-2.0

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
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 f787088

Please sign in to comment.