diff --git a/Dockerfile.kratos b/Dockerfile.kratos index a26cb2c6..4a05b55f 100644 --- a/Dockerfile.kratos +++ b/Dockerfile.kratos @@ -32,7 +32,7 @@ RUN go mod download RUN go build -tags sqlite -ldflags="-X 'github.com/ory/kratos/driver/config.Version=${VERSION}' -X 'github.com/ory/kratos/driver/config.Date=$(date -I)' -X 'github.com/ory/kratos/driver/config.Commit=$(git rev-parse --short HEAD)'" -FROM ghcr.io/security-onion-solutions/alpine:latest +FROM ghcr.io/security-onion-solutions/ubuntu:23.04 ENV DSN=sqlite:///kratos-data/db.sqlite?_fk=true @@ -40,11 +40,8 @@ ARG UID=928 ARG GID=928 ARG OWNER=ory -RUN addgroup --gid "$GID" -S kratos; \ - adduser -u "$UID" -S kratos -G kratos -D -H -s /bin/nologin -RUN apk add -U --no-cache ca-certificates - -RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf +RUN groupadd --system kratos --gid "$GID" ; \ + useradd --system kratos --no-create-home -g kratos --uid "$UID" RUN echo "#!/bin/sh" > /start-kratos.sh RUN echo "kratos -c /kratos-conf/kratos.yaml migrate sql -e --yes >> /kratos-log/kratos-migrate.log 2>&1" >> /start-kratos.sh