Skip to content

Commit

Permalink
Tag docker built with date?
Browse files Browse the repository at this point in the history
  • Loading branch information
pramsey committed Jun 23, 2022
1 parent f49d9f6 commit ad4ea29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ GOVERSION := 1.15
PROGRAM := pg_tileserv
CONFIG := config/$(PROGRAM).toml
CONTAINER := pramsey/$(PROGRAM)
DATE := $(shell date +%Y%m%d)

RM = /bin/rm
CP = /bin/cp
Expand Down Expand Up @@ -36,7 +37,7 @@ bin-docker: ## Build a local binary based off of a golang base docker image
sudo docker run --rm -v "$(PWD)":/usr/src/myapp:z -w /usr/src/myapp golang:$(GOVERSION) make APPVERSION=$(APPVERSION) build

build-docker: $(PROGRAM) Dockerfile ## Generate a CentOS 7 container with APPVERSION tag, using binary from current environment
docker build -f Dockerfile --build-arg VERSION=$(APPVERSION) -t $(CONTAINER):$(APPVERSION) .
docker build -f Dockerfile --build-arg VERSION=$(APPVERSION) -t $(CONTAINER):$(APPVERSION) -t $(CONTAINER):$(DATE) .

release: clean docs build build-docker ## Generate the docs, a local build, and then uses the local build to generate a CentOS 7 container

Expand Down

0 comments on commit ad4ea29

Please sign in to comment.