Last active
January 30, 2018 20:25
-
-
Save xcoulon/cccbf21a8342d04a64e517605fefe1ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build image | |
FROM centos:7 as builder | |
... | |
ARG BUILD_COMMIT=unknown | |
ARG BUILD_TIME=unknown | |
RUN go build -ldflags "-X github.com/xcoulon/go-url-shortener/configuration.BuildCommit=${BUILD_COMMIT} -X github.com/xcoulon/go-url-shortener/configuration.BuildTime=${BUILD_TIME}" -o bin/go-url-shortener | |
... | |
# final image | |
FROM centos:7 | |
... | |
ARG BUILD_COMMIT=unknown | |
ARG BUILD_TIME=unknown | |
LABEL url-shortener.version=${BUILD_COMMIT} \ | |
url-shortener.build-time=${BUILD_TIME} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment