-
-
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.
Reintroduces alpine based docker image
Closes #703
- Loading branch information
Showing
3 changed files
with
32 additions
and
0 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
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,27 @@ | ||
FROM golang:1.9-alpine | ||
|
||
ARG git_tag | ||
ARG git_commit | ||
|
||
RUN apk add --no-cache git build-base curl | ||
RUN curl -L -s https://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64 -o $GOPATH/bin/dep | ||
RUN chmod +x $GOPATH/bin/dep | ||
|
||
WORKDIR /go/src/github.com/ory/hydra | ||
|
||
ADD ./Gopkg.lock ./Gopkg.lock | ||
ADD ./Gopkg.toml ./Gopkg.toml | ||
RUN dep ensure -vendor-only | ||
|
||
ADD . . | ||
|
||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -X github.com/ory/hydra/cmd.Version=$git_tag -X github.com/ory/hydra/cmd.BuildTime=`TZ=UTC date -u '+%Y-%m-%dT%H:%M:%SZ'` -X github.com/ory/hydra/cmd.GitHash=$git_commit" -a -installsuffix cgo -o hydra | ||
|
||
FROM alpine:3.7 | ||
|
||
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
COPY --from=0 /go/src/github.com/ory/hydra/hydra /usr/bin/hydra | ||
|
||
ENTRYPOINT ["hydra"] | ||
|
||
CMD ["host"] |
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