blob: f2f914603c08c43cbdc143fc1c8c4edb168a8983 [file] [log] [blame]
Mohammed Naser564caa82025-01-18 15:49:44 -05001# SPDX-FileCopyrightText: © 2025 VEXXHOST, Inc.
2# SPDX-License-Identifier: GPL-3.0-or-later
Mohammed Naser30004232025-02-20 16:43:21 -05003# Atmosphere-Rebuild-Time: 2025-02-20T21:42:46Z
Mohammed Naserda994232024-04-13 12:34:01 -04004
Mohammed Naser564caa82025-01-18 15:49:44 -05005FROM openstack-venv-builder AS build
Mohammed Naser8ed5c8e2025-03-19 23:37:52 -04006# renovate: name=openstack/keystone repo=https://opendev.org/openstack/keystone.git branch=stable/2024.2
Mohammed Naser49aa2332025-02-17 16:53:31 -05007ARG KEYSTONE_GIT_REF=47891f4ae8fd7876e5a7657f58c32c371feeddc3
Mohammed Naserda994232024-04-13 12:34:01 -04008ADD --keep-git-dir=true https://opendev.org/openstack/keystone.git#${KEYSTONE_GIT_REF} /src/keystone
9RUN git -C /src/keystone fetch --unshallow
Mohammed Naserafc8c8c2025-02-21 15:02:33 -050010RUN --mount=type=cache,target=/root/.cache/uv <<EOF bash -xe
11uv pip install \
Mohammed Naserda994232024-04-13 12:34:01 -040012 --constraint /upper-constraints.txt \
13 /src/keystone[ldap] \
Mohammed Naser49aa2332025-02-17 16:53:31 -050014 keystone-keycloak-backend==0.2.0
Mohammed Naserda994232024-04-13 12:34:01 -040015EOF
16
Mohammed Naser564caa82025-01-18 15:49:44 -050017FROM openstack-python-runtime
Mohammed Naserda994232024-04-13 12:34:01 -040018RUN <<EOF bash -xe
19apt-get update -qq
20apt-get install -qq -y --no-install-recommends \
21 apache2 libapache2-mod-wsgi-py3
22apt-get clean
23rm -rf /var/lib/apt/lists/*
24EOF
25ARG MOD_AUTH_OPENIDC_VERSION=2.4.12.1
26ARG TARGETARCH
27RUN <<EOF bash -xe
Mohammed Naser564caa82025-01-18 15:49:44 -050028# TODO(mnaser): mod_auth_openidc does not have aarch64 builds
29if [ "${TARGETARCH}" = "arm64" ]; then
30 exit 0
31fi
32
Mohammed Naserda994232024-04-13 12:34:01 -040033apt-get update -qq
34apt-get install -qq -y --no-install-recommends \
35 curl
36curl -LO https://github.com/OpenIDC/mod_auth_openidc/releases/download/v${MOD_AUTH_OPENIDC_VERSION}/libapache2-mod-auth-openidc_${MOD_AUTH_OPENIDC_VERSION}-1.$(lsb_release -sc)_${TARGETARCH}.deb
37apt-get install -y --no-install-recommends ./libapache2-mod-auth-openidc_${MOD_AUTH_OPENIDC_VERSION}-1.$(lsb_release -sc)_${TARGETARCH}.deb
38a2enmod auth_openidc
39apt-get purge -y --auto-remove curl
40apt-get clean
41rm -rfv /var/lib/apt/lists/* libapache2-mod-auth-openidc_${MOD_AUTH_OPENIDC_VERSION}-1.$(lsb_release -sc)_${TARGETARCH}.deb
42EOF
43COPY --from=build --link /var/lib/openstack /var/lib/openstack