add version info

This commit is contained in:
codeskyblue
2018-09-26 16:10:27 +08:00
parent b0403b60d9
commit cdc5b318a0
3 changed files with 4 additions and 2 deletions

2
.gitignore vendored
View File

@@ -27,3 +27,5 @@ _testmain.go
gohttpserver
bindata_assetfs.go
assets_vfsdata.go
*.un~
*.swp

View File

@@ -2,7 +2,7 @@ FROM golang:1.10
WORKDIR /go/src/github.com/codeskyblue/gohttpserver
ADD . /go/src/github.com/codeskyblue/gohttpserver/
RUN go get -v
RUN CGO_ENABLED=0 GOOS=linux go build -o gohttpserver .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-X main.VERSION=docker' -o gohttpserver
FROM debian:stretch
WORKDIR /app

View File

@@ -2,7 +2,7 @@ FROM golang:1.10
WORKDIR /go/src/github.com/codeskyblue/gohttpserver
ADD . /go/src/github.com/codeskyblue/gohttpserver/
RUN go get -v
RUN GOOS=linux GOARCH=arm go build -o gohttpserver .
RUN GOOS=linux GOARCH=arm go build -ldflags '-X main.VERSION=docker' -o gohttpserver .
FROM multiarch/debian-debootstrap:armhf-stretch
WORKDIR /app