Skip to content

Instantly share code, notes, and snippets.

@delabassee
Created November 12, 2018 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save delabassee/c48243c410165e98085673f71ca987ee to your computer and use it in GitHub Desktop.
Save delabassee/c48243c410165e98085673f71ca987ee to your computer and use it in GitHub Desktop.
Dockerfile to build Hotwrap (without vendors dips)
# docker build -t delabassee/hotwrap .
FROM golang:1.10 as builder
#COPY vendor /go/src/github.com/fnproject/hotwrap/vendor
COPY hotwrap.go /go/src/github.com/fnproject/hotwrap/hotwrap.go
RUN go get github.com/fnproject/fdk-go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags="-w -s" -o /hotwrap /go/src/github.com/fnproject/hotwrap/hotwrap.go
FROM scratch
COPY --from=builder /hotwrap /hotwrap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment