Docker for golang application
go-wrapper
has been deprecated and removed from the images using go
version 10 and above. See here.
If you are fine using go v1.9
you can use the following image: golang:1.9.6-alpine3.7
.
So your Dockerfile
will be:
FROM golang:1.9.6-alpine3.7
WORKDIR /go/src/app
COPY . .
RUN apk add --no-cache git
RUN go-wrapper download # "go get -d -v ./..."
RUN go-wrapper install # "go install -v ./..."
#final stage
FROM alpine:latest
RUN apk --no-cache add ca-certificates
COPY --from=builder /go/bin/app /app
ENTRYPOINT ./app
LABEL Name=cloud-native-go Version=0.0.1
EXPOSE 3000