blob: cd11c6fd887cbcbb57dfde612f3ab03699d49645 [file] [log] [blame]
Mohammed Naserf1ac3f82025-01-18 15:49:44 -05001# SPDX-FileCopyrightText: © 2025 VEXXHOST, Inc.
2# SPDX-License-Identifier: GPL-3.0-or-later
3# Atmosphere-Rebuild-Time: 2024-06-26T17:38:39Z
Mohammed Naserda994232024-04-13 12:34:01 -04004
Mohammed Naserf1ac3f82025-01-18 15:49:44 -05005FROM openstack-venv-builder AS build
Mohammed Naser442a54a2025-03-19 23:37:52 -04006# renovate: name=openstack/keystone repo=https://opendev.org/openstack/keystone.git branch=stable/2023.2
Mohammed Naser142dc922024-06-20 21:19:25 -04007ARG KEYSTONE_GIT_REF=7697140fc23cee66b17050651813ebe902671256
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 Naser142dc922024-06-20 21:19:25 -040010COPY patches/keystone /patches/keystone
11RUN git -C /src/keystone apply --verbose /patches/keystone/*
Mohammed Naserda994232024-04-13 12:34:01 -040012RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
13pip3 install \
14 --constraint /upper-constraints.txt \
15 /src/keystone[ldap] \
16 keystone-keycloak-backend==0.1.8
17EOF
18
Mohammed Naserf1ac3f82025-01-18 15:49:44 -050019FROM openstack-python-runtime
Mohammed Naserda994232024-04-13 12:34:01 -040020RUN <<EOF bash -xe
21apt-get update -qq
22apt-get install -qq -y --no-install-recommends \
23 apache2 libapache2-mod-wsgi-py3
24apt-get clean
25rm -rf /var/lib/apt/lists/*
26EOF
27ARG MOD_AUTH_OPENIDC_VERSION=2.4.12.1
28ARG TARGETARCH
29RUN <<EOF bash -xe
Mohammed Naserf1ac3f82025-01-18 15:49:44 -050030# TODO(mnaser): mod_auth_openidc does not have aarch64 builds
31if [ "${TARGETARCH}" = "arm64" ]; then
32 exit 0
33fi
34
Mohammed Naserda994232024-04-13 12:34:01 -040035apt-get update -qq
36apt-get install -qq -y --no-install-recommends \
37 curl
38curl -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
39apt-get install -y --no-install-recommends ./libapache2-mod-auth-openidc_${MOD_AUTH_OPENIDC_VERSION}-1.$(lsb_release -sc)_${TARGETARCH}.deb
40a2enmod auth_openidc
41apt-get purge -y --auto-remove curl
42apt-get clean
43rm -rfv /var/lib/apt/lists/* libapache2-mod-auth-openidc_${MOD_AUTH_OPENIDC_VERSION}-1.$(lsb_release -sc)_${TARGETARCH}.deb
44EOF
45COPY --from=build --link /var/lib/openstack /var/lib/openstack