mirror of
https://github.com/jimeh/casecmp.git
synced 2026-02-19 10:26:40 +00:00
Run "dep ensure" as part of docker build process
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -1,8 +1,15 @@
|
|||||||
FROM golang:1.10-alpine as builder
|
FROM golang:1.10-alpine as builder
|
||||||
ADD . /go/src/github.com/jimeh/casecmp
|
RUN set -e \
|
||||||
|
&& apk add --no-cache git \
|
||||||
|
&& wget -O - https://github.com/golang/dep/raw/master/install.sh | sh
|
||||||
|
|
||||||
WORKDIR /go/src/github.com/jimeh/casecmp
|
WORKDIR /go/src/github.com/jimeh/casecmp
|
||||||
RUN CGO_ENABLED=0 go build -a -o /casecmp \
|
ADD . /go/src/github.com/jimeh/casecmp
|
||||||
-ldflags "-X main.Version=$(cat VERSION)"
|
RUN set -e \
|
||||||
|
&& dep ensure \
|
||||||
|
&& CGO_ENABLED=0 go build -a -o /casecmp \
|
||||||
|
-ldflags "-X main.Version=$(cat VERSION)"
|
||||||
|
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
COPY --from=builder /casecmp /
|
COPY --from=builder /casecmp /
|
||||||
|
|||||||
Reference in New Issue
Block a user