Dockerfile.build 257 B

1234567891011
  1. FROM golang:1.8
  2. ADD src/sampleapp $GOPATH/src/sampleapp
  3. WORKDIR $GOPATH
  4. RUN go get sampleapp/cmd/server
  5. RUN go test sampleapp/customersvc
  6. RUN go test sampleapp
  7. RUN CGO_ENABLED=0 go build -o bin/sampleapp sampleapp/cmd/server
  8. CMD tar -czf - bin/sampleapp