Add Dockerfile

This commit is contained in:
Joel Speed 2018-12-20 11:06:26 +00:00
parent d37cc2889e
commit 7fa913e51c
No known key found for this signature in database
GPG Key ID: 6E80578D6751DEFB
2 changed files with 17 additions and 0 deletions

View File

@ -2,6 +2,7 @@
## Changes since v2.2: ## Changes since v2.2:
- Add Dockerfile
- Fix fsnotify import - Fix fsnotify import
- Update README to reflect new repository ownership - Update README to reflect new repository ownership
- Update CI scripts to separate linting and testing - Update CI scripts to separate linting and testing

16
Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM golang:1.10 AS builder
WORKDIR /go/src/github.com/pusher/oauth2_proxy
COPY . .
# Fetch dependencies
RUN go get -u github.com/golang/dep/cmd/dep
RUN dep ensure --vendor-only
# Build image
RUN CGO_ENABLED=0 GOOS=linux go build
# Copy binary to alpine
FROM alpine:3.8
COPY --from=builder /go/src/github.com/pusher/oauth2_proxy/oauth2_proxy /bin/oauth2_proxy
ENTRYPOINT ["/bin/oauth2_proxy"]