From ee7535705900f1d67306457c5b559717d430bfa4 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 11 Sep 2023 22:01:20 +0200 Subject: [PATCH] root: move root-dir in docker Signed-off-by: Jens Langhammer --- Dockerfile | 29 +++++++++++++++-------------- authentik/lib/default.yml | 4 ++-- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 114be6253..e99499ff2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -120,7 +120,7 @@ LABEL org.opencontainers.image.source https://github.com/goauthentik/authentik LABEL org.opencontainers.image.version ${VERSION} LABEL org.opencontainers.image.revision ${GIT_BUILD_HASH} -WORKDIR / +WORKDIR /ak-root # We cannot cache this layer otherwise we'll end up with a bigger image RUN apt-get update && \ @@ -136,28 +136,29 @@ RUN apt-get update && \ mkdir -p /ak-root && \ chown authentik:authentik /certs /media /authentik/.ssh /ak-root -COPY ./authentik/ /authentik -COPY ./pyproject.toml / -COPY ./poetry.lock / -COPY ./schemas /schemas -COPY ./locale /locale -COPY ./tests /tests -COPY ./manage.py / +COPY ./authentik/ /ak-root/authentik +COPY ./pyproject.toml /ak-root +COPY ./poetry.lock /ak-root +COPY ./schemas /ak-root/schemas +COPY ./locale /ak-root/locale +COPY ./tests /ak-root/tests +COPY ./manage.py /ak-root/ COPY ./blueprints /blueprints -COPY ./lifecycle/ /lifecycle +COPY ./lifecycle/ /ak-root/lifecycle COPY --from=go-builder /go/authentik /bin/authentik COPY --from=python-deps /ak-root/venv /ak-root/venv -COPY --from=web-builder /work/web/dist/ /web/dist/ -COPY --from=web-builder /work/web/authentik/ /web/authentik/ -COPY --from=website-builder /work/website/help/ /website/help/ -COPY --from=geoip /usr/share/GeoIP /geoip +COPY --from=python-deps /work/venv /ak-root/venv +COPY --from=web-builder /work/web/dist/ /ak-root/web/dist/ +COPY --from=web-builder /work/web/authentik/ /ak-root/web/authentik/ +COPY --from=website-builder /work/website/help/ /ak-root/website/help/ +COPY --from=geoip /usr/share/GeoIP /ak-root/geoip USER 1000 ENV TMPDIR=/dev/shm/ \ PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ - PATH="/ak-root/venv/bin:/lifecycle:$PATH" \ + PATH="/ak-root/venv/bin:/ak-root/lifecycle:$PATH" \ VENV_PATH="/ak-root/venv" \ POETRY_VIRTUALENVS_CREATE=false diff --git a/authentik/lib/default.yml b/authentik/lib/default.yml index afb775c44..0f73d8fe4 100644 --- a/authentik/lib/default.yml +++ b/authentik/lib/default.yml @@ -110,8 +110,8 @@ disable_startup_analytics: false avatars: env://AUTHENTIK_AUTHENTIK__AVATARS?gravatar,initials events: context_processors: - geoip: "/geoip/GeoLite2-City.mmdb" - asn: "/geoip/GeoLite2-ASN.mmdb" + geoip: "/ak-root/geoip/GeoLite2-City.mmdb" + asn: "/ak-root/geoip/GeoLite2-ASN.mmdb" footer_links: []