link flags in docker build

This commit is contained in:
Thomas Rudin 2019-03-29 19:40:30 +01:00
parent 126ed07ef8
commit e101b5d6d0

View File

@ -10,8 +10,8 @@ VOLUME /root/go
COPY ./ /server
RUN cd /server &&\
go generate &&\
go test &&\
CGO_ENABLED=1 go build
go test ./... &&\
CGO_ENABLED=1 go build -ldflags "-linkmode external -extldflags -static -X mapserver/app.Version=docker"
FROM alpine:latest
RUN apk --no-cache add ca-certificates