File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 1- FROM golang:onbuild
1+ FROM golang:1.14.4-alpine3.11 as builder
2+
3+ RUN apk add --update ca-certificates git
4+
5+ ENV SRC github.com/segmentio/segment-proxy
6+ ENV CGO_ENABLED=0
7+ ENV GO111MODULE=on
8+ ENV GOOS=linux
9+ ENV GOARCH=amd64
10+
11+ ARG VERSION
12+
13+ COPY . /go/src/${SRC}
14+ WORKDIR /go/src/${SRC}
15+
16+ RUn go build -a -installsuffix cgo -ldflags "-w -s -extldflags '-static' -X main.version=$VERSION" -o /proxy
17+
18+ FROM scratch
19+
20+ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
21+ COPY --from=builder /proxy /proxy
22+
223EXPOSE 8080
24+
25+ ENTRYPOINT ["/proxy" ]
Original file line number Diff line number Diff line change 1+ module github.com/segmentio/segment-proxy
2+
3+ go 1.13
4+
5+ require github.com/gorilla/handlers v0.0.0-20160228171604-ee54c7b44cab
You can’t perform that action at this time.
0 commit comments