瀏覽代碼

Merge pull request #843 from docker/pin_image_version

Pin version of ACI sidecar image, so that we don’t affect prod users when re-publishing :latest.
Guillaume Tardif 5 年之前
父節點
當前提交
5450791ba7
共有 2 個文件被更改,包括 7 次插入1 次删除
  1. 6 0
      Makefile
  2. 1 1
      aci/convert/convert.go

+ 6 - 0
Makefile

@@ -98,6 +98,12 @@ validate: validate-go-mod validate-headers ## Validate sources
 
 pre-commit: cli test e2e-local lint validate
 
+build-aci-sidecar:  ## build aci sidecar image locally and tag it with make build-aci-sidecar tag=0.1
+	docker build -t docker/aci-hostnames-sidecar:$(tag) aci/etchosts
+
+publish-aci-sidecar: build-aci-sidecar ## build & publish aci sidecar image with make publish-aci-sidecar tag=0.1
+	docker pull docker/aci-hostnames-sidecar:$(tag) && echo "Failure: Tag already exists" || docker push docker/aci-hostnames-sidecar:$(tag)
+
 clean-aci-e2e: ## Make sure no ACI tests are currently runnnig in the CI when invoking this. Delete ACI E2E tests resources that might have leaked when ctrl-C E2E tests.
 	 az group list | jq '.[].name' | grep E2E-Test | xargs -n1 az group delete -y --no-wait -g
 

+ 1 - 1
aci/convert/convert.go

@@ -42,7 +42,7 @@ const (
 	// ComposeDNSSidecarName name of the dns sidecar container
 	ComposeDNSSidecarName = "aci--dns--sidecar"
 
-	dnsSidecarImage = "docker/aci-hostnames-sidecar"
+	dnsSidecarImage = "docker/aci-hostnames-sidecar:1.0"
 )
 
 // ToContainerGroup converts a compose project into a ACI container group