Commit 769d4224 authored by Miek Gieben's avatar Miek Gieben

Add docker tagging

Small tweak to tag docker image with current release number.
parent 3d5be649
...@@ -3,6 +3,7 @@ BUILD_VERBOSE := -v ...@@ -3,6 +3,7 @@ BUILD_VERBOSE := -v
TEST_VERBOSE := -v TEST_VERBOSE := -v
DOCKER_IMAGE_NAME := $$USER/coredns DOCKER_IMAGE_NAME := $$USER/coredns
DOCKER_VERSION := $(shell grep 'coreVersion' coremain/version.go | awk '{ print $$3 }' | tr -d '"')
all: coredns all: coredns
...@@ -16,6 +17,7 @@ coredns: deps ...@@ -16,6 +17,7 @@ coredns: deps
docker: deps docker: deps
CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w"
docker build -t $(DOCKER_IMAGE_NAME) . docker build -t $(DOCKER_IMAGE_NAME) .
docker tag $(DOCKER_IMAGE_NAME):latest $(DOCKER_IMAGE_NAME):$(DOCKER_VERSION)
.PHONY: deps .PHONY: deps
deps: deps:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment