blob: 0376f1819e043f21e9e271be325eac6240b38752 [file] [log] [blame]
Mohammed Naser7bda44d2025-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 Naserd28fbaf2024-04-08 17:15:00 -04004
Mohammed Naser7bda44d2025-01-18 15:49:44 -05005FROM openstack-venv-builder AS build
Mohammed Naserd28fbaf2024-04-08 17:15:00 -04006ARG KEYSTONE_GIT_REF=f63062d47712406a807ce07b4ff3ec6213b0e824
7ADD --keep-git-dir=true https://opendev.org/openstack/keystone.git#${KEYSTONE_GIT_REF} /src/keystone
8RUN git -C /src/keystone fetch --unshallow
9COPY patches/keystone /patches/keystone
10RUN git -C /src/keystone apply --verbose /patches/keystone/*
11RUN --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 Naser7bda44d2025-01-18 15:49:44 -050018FROM openstack-python-runtime
Mohammed Naserd28fbaf2024-04-08 17:15:00 -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 Naser7bda44d2025-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 Naserd28fbaf2024-04-08 17:15:00 -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