Skip to content

Commit

Permalink
fix: Dockerfiles (#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
zepatrik committed Sep 28, 2021
1 parent 9eda48c commit f10dec1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .docker/Dockerfile
@@ -1,4 +1,4 @@
FROM alpine:3.13
FROM alpine:3.14.2

RUN addgroup -S ory; \
adduser -S ory -G ory -D -h /home/ory -s /bin/nologin; \
Expand All @@ -8,11 +8,11 @@ RUN apk add -U --no-cache ca-certificates

COPY keto /usr/bin/keto

# Exposing the ory home directory to simplify passing in keto configuration (e.g. if the file $HOME/.keto.yaml
# Exposing the ory home directory to simplify passing in keto configuration (e.g. if the file $HOME/keto.yaml
# exists, it will be automatically used as the configuration file).
VOLUME /home/ory

# Declare the standard ports used by keto (4433 for public service endpoint, 4434 for admin service endpoint)
# Declare the standard ports used by keto (4433 for read service endpoint, 4434 for write service endpoint)
EXPOSE 4433 4434

USER ory
Expand Down
7 changes: 5 additions & 2 deletions .docker/Dockerfile-build
@@ -1,4 +1,4 @@
FROM golang:1.16-alpine AS builder
FROM golang:1.17-alpine3.14 AS builder

RUN apk -U --no-cache add build-base git gcc bash

Expand All @@ -7,6 +7,9 @@ WORKDIR /go/src/github.com/ory/keto
ADD go.mod go.mod
ADD go.sum go.sum

ADD proto/go.mod proto/go.mod
ADD proto/go.sum proto/go.sum

ENV CGO_ENABLED 1

RUN go mod download
Expand All @@ -15,7 +18,7 @@ ADD . .

RUN go build -tags sqlite -o /usr/bin/keto .

FROM alpine:3.13
FROM alpine:3.14.2

RUN addgroup -S ory; \
adduser -S ory -G ory -D -h /home/ory -s /bin/nologin; \
Expand Down
4 changes: 2 additions & 2 deletions .docker/Dockerfile-sqlite
@@ -1,4 +1,4 @@
FROM alpine:3.13
FROM alpine:3.14.2

# Because this image is built for SQLite, we create /home/ory and /home/ory/sqlite which is owned by the ory user
# and declare /home/ory/sqlite a volume.
Expand Down Expand Up @@ -26,7 +26,7 @@ VOLUME /var/lib/sqlite
# exists, it will be automatically used as the configuration file).
VOLUME /home/ory

# Declare the standard ports used by keto (4433 for public service endpoint, 4434 for admin service endpoint)
# Declare the standard ports used by keto (4433 for read service endpoint, 4434 for write service endpoint)
EXPOSE 4433 4434

USER ory
Expand Down

0 comments on commit f10dec1

Please sign in to comment.