Basic but complete authentication flow
This commit is contained in:
16
misc/containers/hydra/Dockerfile
Normal file
16
misc/containers/hydra/Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
FROM oryd/hydra:v1.4.2-alpine
|
||||
|
||||
USER root
|
||||
|
||||
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint
|
||||
RUN chmod a+x /usr/local/bin/docker-entrypoint
|
||||
|
||||
COPY first-run.sh /usr/local/bin/docker-first-run
|
||||
RUN chmod a+x /usr/local/bin/docker-first-run
|
||||
|
||||
RUN mkdir -p /home/ory && chown -R ory: /home/ory
|
||||
|
||||
USER ory
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint"]
|
||||
CMD ["hydra", "serve", "all"]
|
14
misc/containers/hydra/docker-entrypoint.sh
Normal file
14
misc/containers/hydra/docker-entrypoint.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -xeo pipefail
|
||||
|
||||
LIFECYCLEFLAGS_DIR="$HOME/.container-lifecycle"
|
||||
|
||||
mkdir -p "$LIFECYCLEFLAGS_DIR"
|
||||
|
||||
if [ ! -f "$LIFECYCLEFLAGS_DIR/first-run" ]; then
|
||||
/usr/local/bin/docker-first-run
|
||||
touch "$LIFECYCLEFLAGS_DIR/first-run"
|
||||
fi
|
||||
|
||||
exec "$@"
|
3
misc/containers/hydra/first-run.sh
Normal file
3
misc/containers/hydra/first-run.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
hydra migrate sql -e -y
|
Reference in New Issue
Block a user