dnscontrol
dnscontrol copied to clipboard
Docker image - Build version
@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
Successful build done by PR https://github.com/StackExchange/dnscontrol/pull/1694, see the Docker Hub results here.