blob: db6d202db2086da3c2abc7f721cfce64fcd4c43b [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 Naser142dc922024-06-20 21:19:25 -04006ARG KEYSTONE_GIT_REF=7697140fc23cee66b17050651813ebe902671256
Mohammed Naserda994232024-04-13 12:34:01 -04007ADD --keep-git-dir=true https://opendev.org/openstack/keystone.git#${KEYSTONE_GIT_REF} /src/keystone
8RUN git -C /src/keystone fetch --unshallow
Mohammed Naser142dc922024-06-20 21:19:25 -04009COPY patches/keystone /patches/keystone
10RUN git -C /src/keystone apply --verbose /patches/keystone/*
Mohammed Naserda994232024-04-13 12:34:01 -040011RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
12pip3 install \
13 --constraint /upper-constraints.txt \
14 /src/keystone[ldap] \
15 keystone-keycloak-backend==0.1.8
16EOF
17
Mohammed Naserf1ac3f82025-01-18 15:49:44 -050018FROM openstack-python-runtime
Mohammed Naserda994232024-04-13 12:34:01 -040019RUN <<EOF bash -xe
20apt-get update -qq
21apt-get install -qq -y --no-install-recommends \
22 apache2 libapache2-mod-wsgi-py3
23apt-get clean
24rm -rf /var/lib/apt/lists/*
25EOF
26ARG MOD_AUTH_OPENIDC_VERSION=2.4.12.1
27ARG TARGETARCH
28RUN <<EOF bash -xe
Mohammed Naserf1ac3f82025-01-18 15:49:44 -050029# TODO(mnaser): mod_auth_openidc does not have aarch64 builds
30if [ "${TARGETARCH}" = "arm64" ]; then
31 exit 0
32fi
33
Mohammed Naserda994232024-04-13 12:34:01 -040034apt-get update -qq
35apt-get install -qq -y --no-install-recommends \
36 curl
37curl -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
38apt-get install -y --no-install-recommends ./libapache2-mod-auth-openidc_${MOD_AUTH_OPENIDC_VERSION}-1.$(lsb_release -sc)_${TARGETARCH}.deb
39a2enmod auth_openidc
40apt-get purge -y --auto-remove curl
41apt-get clean
42rm -rfv /var/lib/apt/lists/* libapache2-mod-auth-openidc_${MOD_AUTH_OPENIDC_VERSION}-1.$(lsb_release -sc)_${TARGETARCH}.deb
43EOF
44COPY --from=build --link /var/lib/openstack /var/lib/openstack