diff --git a/Dockerfile b/Dockerfile index 7d6fca7..ec4f390 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ FROM golang:alpine3.12 AS builder WORKDIR /go/src/github.com/testcontainers/helloworld +COPY go.mod go.sum ./ +RUN go mod download COPY . ./ -RUN go get . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o /helloworld . FROM scratch