Skip to content

Commit

Permalink
docker: Add alpine image (#1566)
Browse files Browse the repository at this point in the history
Closes #1558
  • Loading branch information
aeneasr authored Sep 18, 2019
1 parent a8f6e44 commit 2fbcb59
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 11 deletions.
30 changes: 21 additions & 9 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
brew:
github:
owner: ory
name: homebrew-hydra
homepage: https://www.ory.sh
commit_author:
name: ory
email: [email protected]
brews:
- github:
owner: ory
name: homebrew-hydra
homepage: https://www.ory.sh
commit_author:
name: ory
email: [email protected]

scoop:
bucket:
Expand All @@ -68,12 +68,24 @@ scoop:
email: [email protected]

dockers:
- image_templates:
- dockerfile: Dockerfile
binaries:
- hydra
image_templates:
- "oryd/hydra:v{{ .Major }}"
- "oryd/hydra:v{{ .Major }}.{{ .Minor }}"
- "oryd/hydra:v{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
- "oryd/hydra:{{ .Env.DOCKER_SHORT_TAG }}"
- "oryd/hydra:latest"
- dockerfile: Dockerfile-alpine
binaries:
- hydra
image_templates:
- "oryd/hydra:v{{ .Major }}-alpine"
- "oryd/hydra:v{{ .Major }}.{{ .Minor }}-alpine"
- "oryd/hydra:v{{ .Major }}.{{ .Minor }}.{{ .Patch }}-alpine"
- "oryd/hydra:{{ .Env.DOCKER_SHORT_TAG }}-alpine"
- "oryd/hydra:latest-alpine"

release:
prerelease: auto
Expand Down
13 changes: 13 additions & 0 deletions Dockerfile-alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# To compile this image manually run:
#
# $ GO111MODULE=on GOOS=linux GOARCH=amd64 go build && docker build -t oryd/hydra:v1.0.0-rc.7_oryOS.10 . && rm hydra
FROM alpine:3.9

RUN apk add -U --no-cache ca-certificates

COPY hydra /usr/bin/hydra

USER 1000

ENTRYPOINT ["hydra"]
CMD ["serve", "all"]
2 changes: 1 addition & 1 deletion oauth2/fosite_store_memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (s *FositeMemoryStore) GetClients(ctx context.Context, limit, offset int) (
}

clients := map[string]client.Client{}
for _, c := range interim {
for _, c := range interim {
clients[c.GetID()] = c
}

Expand Down
2 changes: 1 addition & 1 deletion oauth2/fosite_store_sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func (s *FositeSQLStore) GetClients(ctx context.Context, limit, offset int) (map
}

clients := map[string]client.Client{}
for _, c := range interim {
for _, c := range interim {
clients[c.GetID()] = c
}

Expand Down

0 comments on commit 2fbcb59

Please sign in to comment.