Skip to content
Snippets Groups Projects
Commit 7c7422c1 authored by Will McCutchen's avatar Will McCutchen
Browse files

Tag docker images with commit hash, for now

parent 6ec6c2fb
No related branches found
No related tags found
No related merge requests found
commit := $(shell git rev-parse --short HEAD)
build: dist/go-httpbin build: dist/go-httpbin
dist/go-httpbin: assets cmd/go-httpbin/*.go httpbin/*.go dist/go-httpbin: assets cmd/go-httpbin/*.go httpbin/*.go
...@@ -28,7 +30,7 @@ image: assets cmd/go-httpbin/*.go httpbin/*.go ...@@ -28,7 +30,7 @@ image: assets cmd/go-httpbin/*.go httpbin/*.go
mkdir -p /tmp/go-httpbin-docker mkdir -p /tmp/go-httpbin-docker
cp Dockerfile /tmp/go-httpbin-docker cp Dockerfile /tmp/go-httpbin-docker
GOOS=linux GOARCH=amd64 go build -o /tmp/go-httpbin-docker/go-httpbin ./cmd/go-httpbin GOOS=linux GOARCH=amd64 go build -o /tmp/go-httpbin-docker/go-httpbin ./cmd/go-httpbin
docker build -t mccutchen/go-httpbin /tmp/go-httpbin-docker docker build -t mccutchen/go-httpbin:$(commit) /tmp/go-httpbin-docker
imagepush: image imagepush: image
docker push mccutchen/go-httpbin docker push mccutchen/go-httpbin:$(commit)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment