-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from yaegashi/docker-improvement
Docker improvement
- Loading branch information
Showing
4 changed files
with
21 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dockerfile.dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
FROM golang:1.11-stretch AS builder | ||
WORKDIR /go/src/github.com/pusher/oauth2_proxy | ||
|
||
# Download tools | ||
RUN wget -O $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 | ||
RUN chmod +x $GOPATH/bin/dep | ||
|
||
# Copy sources | ||
WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy | ||
COPY . . | ||
|
||
# Fetch dependencies | ||
RUN wget -O dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 | ||
RUN chmod +x dep | ||
RUN mv dep $GOPATH/bin/dep | ||
RUN dep ensure --vendor-only | ||
|
||
# Build image | ||
RUN ./configure && make clean oauth2_proxy | ||
# Build binary | ||
RUN ./configure && make build | ||
|
||
# Copy binary to debian | ||
FROM debian:stretch | ||
# Copy binary to alpine | ||
FROM alpine:3.8 | ||
RUN apk add --no-cache ca-certificates | ||
COPY --from=builder /go/src/github.com/pusher/oauth2_proxy/oauth2_proxy /bin/oauth2_proxy | ||
|
||
ENTRYPOINT ["/bin/oauth2_proxy"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters