dnscontrol icon indicating copy to clipboard operation
dnscontrol copied to clipboard

Docker image - Build version

Open cafferata opened this issue 2 years ago • 1 comments

@tlimoncelli commented

You could extract it from main.go:

grep -E "Version *= \"" main.go  | awk '{ print $3 }' | tr -d \"

Make the Docker image build version DOCKER_IMAGE_VERSION aware of the configured version in main.go.

  build-docker-image:
    docker:
      - image: jdrouet/docker-with-buildx:stable

    environment:
      DOCKER_IMAGE_NAME: stackexchange/dnscontrol
      DOCKER_IMAGE_VERSION: 3.18.1
      DOCKER_IMAGE_PLATFORM: linux/amd64,linux/386

https://github.com/StackExchange/dnscontrol/blob/master/.circleci/config.yml#L21

var (
	SHA       = ""
	Version   = "v3.18.1"
	BuildTime = ""
)

https://github.com/StackExchange/dnscontrol/blob/master/main.go#L22

cafferata avatar Aug 11 '22 13:08 cafferata

Successful build done by PR https://github.com/StackExchange/dnscontrol/pull/1694, see the Docker Hub results here.

cafferata avatar Aug 12 '22 08:08 cafferata