Skip to content

Instantly share code, notes, and snippets.

@viettranx
Created September 29, 2018 10:36
Show Gist options
  • Select an option

  • Save viettranx/a6463a9e68b62f77f71731e346f16145 to your computer and use it in GitHub Desktop.

Select an option

Save viettranx/a6463a9e68b62f77f71731e346f16145 to your computer and use it in GitHub Desktop.

Revisions

  1. viettranx created this gist Sep 29, 2018.
    10 changes: 10 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    FROM golang:latest as builder
    RUN mkdir /app
    ADD . /app/
    WORKDIR /app
    RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o demoApp .

    FROM alpine:latest
    WORKDIR /app/
    COPY --from=builder /app .
    CMD ["/app/demoApp"]