Skip to content

Commit

Permalink
Revert "chore: Dockerfile-sqlite - Add commentary"
Browse files Browse the repository at this point in the history
This reverts commit 8a50bbb.
  • Loading branch information
aeneasr committed Jan 11, 2025
1 parent a7e6dd5 commit 5ad3469
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .docker/Dockerfile-sqlite
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# TODO: Remove this file in favor of the main/default Alpine image. The sqlite package is no longer required:
# https://github.com/ory/hydra/blob/master/.docker/Dockerfile-alpine
# However if published to any registry, continue to publish the variant tag but as an alias to standard Alpine image tags:
# https://github.com/ory/hydra/pull/3914#pullrequestreview-2527315326

FROM alpine:3.20

# 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.
#
# To get SQLite and Docker Volumes working with this image, mount the volume where SQLite should be written to at:
#
# /home/ory/sqlite/some-file.

RUN <<HEREDOC
# NOTE: The sqlite package is not required when the later copied hydra binary is built with statically linked sqlite?
apk upgrade --no-cache
apk add --no-cache --upgrade --latest ca-certificates sqlite

# Add a user/group for Ory with a stable UID + GID:
# NOTE: This only appears relevant for supporting hydra as non-root, otherwise unnecessary.
addgroup --system --gid 500 ory
adduser --system --uid 500 \
--gecos "Ory User" \
Expand All @@ -21,8 +22,6 @@ RUN <<HEREDOC

# Create the sqlite directory with ownership to that user and group:
# NOTE: This is required for read/write by SQLite.
# - Path may be a default value somewhere, or only explicitly provided via DSN?
# - Owner/Group is only relevant to permissions allowing the hydra process to read/write to the location.
install --owner ory --group ory --directory /var/lib/sqlite
HEREDOC

Expand Down

0 comments on commit 5ad3469

Please sign in to comment.