Skip to content

Commit

Permalink
Build go binary inside alpine container (prebid#595)
Browse files Browse the repository at this point in the history
* Build go binary inside alpine container

* Remove unnecessary deps from Dockerfile and switch aline from edge to 3.8 version
  • Loading branch information
larrabee authored and dbemiller committed Jul 9, 2018
1 parent df05e99 commit f1f9c5f
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
FROM alpine
FROM alpine:3.8 AS build
WORKDIR /go/src/github.com/prebid/prebid-server/
RUN apk add -U --no-cache go git dep musl-dev
ENV GOPATH /go
COPY ./ ./
RUN dep ensure
RUN go build .


FROM alpine:3.8 AS release
MAINTAINER Brian O'Kelley <[email protected]>
ADD prebid-server prebid-server
WORKDIR /usr/local/bin/
COPY --from=build /go/src/github.com/prebid/prebid-server/prebid-server .
COPY static static/
COPY stored_requests/data stored_requests/data
RUN apk add -U --no-cache ca-certificates
EXPOSE 8000
ENTRYPOINT ["/prebid-server"]
ENTRYPOINT ["/usr/local/bin/prebid-server"]
CMD ["-v", "1", "-logtostderr"]

0 comments on commit f1f9c5f

Please sign in to comment.