Embed version info in docker build

This commit is contained in:
Ken-Håvard Lieng 2018-12-02 07:39:23 +01:00
parent 73205b64f6
commit f05e405fb1
3 changed files with 4 additions and 5 deletions

View File

@ -1,3 +1,2 @@
.git
client/dist
client/node_modules

View File

@ -6,7 +6,7 @@ RUN apk add --update git make build-base && \
WORKDIR /go/src/github.com/khlieng/dispatch
COPY . /go/src/github.com/khlieng/dispatch
RUN go build .
RUN chmod +x install.sh && ./install.sh
# Runtime
FROM alpine
@ -14,7 +14,7 @@ FROM alpine
RUN apk add --update ca-certificates && \
rm -rf /var/cache/apk/*
COPY --from=build /go/src/github.com/khlieng/dispatch/dispatch /dispatch
COPY --from=build /go/bin/dispatch /dispatch
EXPOSE 80/tcp

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh -
Import="github.com/khlieng/dispatch/version"