1- FROM alpine:3.20
2-
3- # Because this image is built for SQLite, we create /home/ory and /home/ory/sqlite which is owned by the ory user
4- # and declare /home/ory/sqlite a volume.
5- #
6- # To get SQLite and Docker Volumes working with this image, mount the volume where SQLite should be written to at:
7- #
8- # /home/ory/sqlite/some-file.
1+ # TODO: Remove this file in favor of the main/default Alpine image. The sqlite package is no longer required:
2+ # https://github.com/ory/hydra/blob/master/.docker/Dockerfile-alpine
3+ # However if published to any registry, continue to publish the variant tag but as an alias to standard Alpine image tags:
4+ # https://github.com/ory/hydra/pull/3914#pullrequestreview-2527315326
95
6+ FROM alpine:3.20
107RUN <<HEREDOC
8+ # NOTE: The sqlite package is not required when the later copied hydra binary is built with statically linked sqlite?
119 apk upgrade --no-cache
1210 apk add --no-cache --upgrade --latest ca-certificates sqlite
1311
1412 # Add a user/group for Ory with a stable UID + GID:
13+ # NOTE: This only appears relevant for supporting hydra as non-root, otherwise unnecessary.
1514 addgroup --system --gid 500 ory
1615 adduser --system --uid 500 \
1716 --gecos "Ory User" \
@@ -22,6 +21,8 @@ RUN <<HEREDOC
2221
2322 # Create the sqlite directory with ownership to that user and group:
2423 # NOTE: This is required for read/write by SQLite.
24+ # - Path may be a default value somewhere, or only explicitly provided via DSN?
25+ # - Owner/Group is only relevant to permissions allowing the hydra process to read/write to the location.
2526 install --owner ory --group ory --directory /var/lib/sqlite
2627HEREDOC
2728
0 commit comments