Skip to content

Commit

Permalink
Merge branch 'main' into web/expressing-success-messages
Browse files Browse the repository at this point in the history
* main:
  scripts: postgres, redis: only listen on localhost (#7849)
  website: bump @types/react from 18.2.42 to 18.2.43 in /website (#7840)
  web: bump ts-node from 10.9.1 to 10.9.2 in /tests/wdio (#7846)
  core: bump github.com/go-openapi/runtime from 0.26.0 to 0.26.2 (#7841)
  website: bump prettier from 3.1.0 to 3.1.1 in /website (#7839)
  web: bump the esbuild group in /web with 2 updates (#7842)
  web: bump rollup from 4.6.1 to 4.7.0 in /web (#7843)
  web: bump prettier from 3.1.0 to 3.1.1 in /web (#7844)
  web: bump the wdio group in /tests/wdio with 2 updates (#7845)
  web: bump prettier from 3.1.0 to 3.1.1 in /tests/wdio (#7847)
  translate: Updates for file web/xliff/en.xlf in fr (#7851)
  translate: Updates for file locale/en/LC_MESSAGES/django.po in fr (#7850)
  core: bump python from 3.12.0-slim-bookworm to 3.12.1-slim-bookworm
  web/flows: update flow background (#7833)
  web/flows: fix logo height (#7834)
  Fix cache related image build issues
  • Loading branch information
kensternberg-authentik committed Dec 11, 2023
2 parents 4f7b981 + 1fccbaa commit 1041f7b
Show file tree
Hide file tree
Showing 19 changed files with 570 additions and 464 deletions.
18 changes: 11 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1

# Stage 1: Build website
FROM --platform=${BUILDPLATFORM} docker.io/node:21 as website-builder

Expand All @@ -7,7 +9,7 @@ WORKDIR /work/website

RUN --mount=type=bind,target=/work/website/package.json,src=./website/package.json \
--mount=type=bind,target=/work/website/package-lock.json,src=./website/package-lock.json \
--mount=type=cache,target=/root/.npm \
--mount=type=cache,id=npm-website,sharing=shared,target=/root/.npm \
npm ci --include=dev

COPY ./website /work/website/
Expand All @@ -25,7 +27,7 @@ WORKDIR /work/web

RUN --mount=type=bind,target=/work/web/package.json,src=./web/package.json \
--mount=type=bind,target=/work/web/package-lock.json,src=./web/package-lock.json \
--mount=type=cache,target=/root/.npm \
--mount=type=cache,id=npm-web,sharing=shared,target=/root/.npm \
npm ci --include=dev

COPY ./web /work/web/
Expand Down Expand Up @@ -62,8 +64,8 @@ COPY ./go.sum /go/src/goauthentik.io/go.sum

ENV CGO_ENABLED=0

RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
RUN --mount=type=cache,sharing=locked,target=/go/pkg/mod \
--mount=type=cache,id=go-build-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/root/.cache/go-build \
GOARM="${TARGETVARIANT#v}" go build -o /go/authentik ./cmd/server

# Stage 4: MaxMind GeoIP
Expand All @@ -81,15 +83,17 @@ RUN --mount=type=secret,id=GEOIPUPDATE_ACCOUNT_ID \
/bin/sh -c "/usr/bin/entry.sh || echo 'Failed to get GeoIP database, disabling'; exit 0"

# Stage 5: Python dependencies
FROM docker.io/python:3.12.0-slim-bookworm AS python-deps
FROM docker.io/python:3.12.1-slim-bookworm AS python-deps

WORKDIR /ak-root/poetry

ENV VENV_PATH="/ak-root/venv" \
POETRY_VIRTUALENVS_CREATE=false \
PATH="/ak-root/venv/bin:$PATH"

RUN --mount=type=cache,target=/var/cache/apt \
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache

RUN --mount=type=cache,id=apt-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/var/cache/apt \
apt-get update && \
# Required for installing pip packages
apt-get install -y --no-install-recommends build-essential pkg-config libxmlsec1-dev zlib1g-dev libpq-dev
Expand All @@ -104,7 +108,7 @@ RUN --mount=type=bind,target=./pyproject.toml,src=./pyproject.toml \
poetry install --only=main --no-ansi --no-interaction

# Stage 6: Run
FROM docker.io/python:3.12.0-slim-bookworm AS final-image
FROM docker.io/python:3.12.1-slim-bookworm AS final-image

ARG GIT_BUILD_HASH
ARG VERSION
Expand Down
21 changes: 11 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/getsentry/sentry-go v0.25.0
github.com/go-http-utils/etag v0.0.0-20161124023236-513ea8f21eb1
github.com/go-ldap/ldap/v3 v3.4.6
github.com/go-openapi/runtime v0.26.0
github.com/go-openapi/runtime v0.26.2
github.com/go-openapi/strfmt v0.21.9
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/google/uuid v1.4.0
Expand Down Expand Up @@ -46,16 +46,16 @@ require (
github.com/go-asn1-ber/asn1-ber v1.5.5 // indirect
github.com/go-http-utils/fresh v0.0.0-20161124030543-7231e26a4b27 // indirect
github.com/go-http-utils/headers v0.0.0-20181008091004-fed159eddc2a // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.21.4 // indirect
github.com/go-openapi/errors v0.20.4 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/loads v0.21.2 // indirect
github.com/go-openapi/spec v0.20.8 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-openapi/validate v0.22.1 // indirect
github.com/go-openapi/spec v0.20.11 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/go-openapi/validate v0.22.3 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand All @@ -69,9 +69,10 @@ require (
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.mongodb.org/mongo-driver v1.13.0 // indirect
go.opentelemetry.io/otel v1.14.0 // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
go.mongodb.org/mongo-driver v1.13.1 // indirect
go.opentelemetry.io/otel v1.17.0 // indirect
go.opentelemetry.io/otel/metric v1.17.0 // indirect
go.opentelemetry.io/otel/trace v1.17.0 // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
Expand Down
Loading

0 comments on commit 1041f7b

Please sign in to comment.