Skip to content

Instantly share code, notes, and snippets.

@zimbatm
Last active December 2, 2019 16:29
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 zimbatm/93ab715f194a4ee755926fd3f35f1ea0 to your computer and use it in GitHub Desktop.
Save zimbatm/93ab715f194a4ee755926fd3f35f1ea0 to your computer and use it in GitHub Desktop.
FROM golang:1.13.1 as builder
RUN mkdir -p /module
COPY go.mod /module/
COPY go.sum /module/
WORKDIR /module
RUN go mod download
COPY go /module/go/
WORKDIR /module/go/cmd/traces
RUN CGO_ENABLED=0 go build -o /traces .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /traces /
EXPOSE 8090
VOLUME [ "/data" ]
CMD ["/traces", "--db-dir", "/data"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment