Mohammed Naser | 7bda44d | 2025-01-18 15:49:44 -0500 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: © 2025 VEXXHOST, Inc. |
| 2 | # SPDX-License-Identifier: GPL-3.0-or-later |
| 3 | # Atmosphere-Rebuild-Time: 2024-06-26T17:38:39Z |
Mohammed Naser | d28fbaf | 2024-04-08 17:15:00 -0400 | [diff] [blame] | 4 | |
Mohammed Naser | 7bda44d | 2025-01-18 15:49:44 -0500 | [diff] [blame] | 5 | FROM openstack-venv-builder AS build |
Mohammed Naser | d28fbaf | 2024-04-08 17:15:00 -0400 | [diff] [blame] | 6 | ARG KEYSTONE_GIT_REF=f63062d47712406a807ce07b4ff3ec6213b0e824 |
| 7 | ADD --keep-git-dir=true https://opendev.org/openstack/keystone.git#${KEYSTONE_GIT_REF} /src/keystone |
| 8 | RUN git -C /src/keystone fetch --unshallow |
| 9 | COPY patches/keystone /patches/keystone |
| 10 | RUN git -C /src/keystone apply --verbose /patches/keystone/* |
| 11 | RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe |
| 12 | pip3 install \ |
| 13 | --constraint /upper-constraints.txt \ |
| 14 | /src/keystone[ldap] \ |
| 15 | keystone-keycloak-backend==0.1.8 |
| 16 | EOF |
| 17 | |
Mohammed Naser | 7bda44d | 2025-01-18 15:49:44 -0500 | [diff] [blame] | 18 | FROM openstack-python-runtime |
Mohammed Naser | d28fbaf | 2024-04-08 17:15:00 -0400 | [diff] [blame] | 19 | RUN <<EOF bash -xe |
| 20 | apt-get update -qq |
| 21 | apt-get install -qq -y --no-install-recommends \ |
| 22 | apache2 libapache2-mod-wsgi-py3 |
| 23 | apt-get clean |
| 24 | rm -rf /var/lib/apt/lists/* |
| 25 | EOF |
| 26 | ARG MOD_AUTH_OPENIDC_VERSION=2.4.12.1 |
| 27 | ARG TARGETARCH |
| 28 | RUN <<EOF bash -xe |
Mohammed Naser | 7bda44d | 2025-01-18 15:49:44 -0500 | [diff] [blame] | 29 | # TODO(mnaser): mod_auth_openidc does not have aarch64 builds |
| 30 | if [ "${TARGETARCH}" = "arm64" ]; then |
| 31 | exit 0 |
| 32 | fi |
| 33 | |
Mohammed Naser | d28fbaf | 2024-04-08 17:15:00 -0400 | [diff] [blame] | 34 | apt-get update -qq |
| 35 | apt-get install -qq -y --no-install-recommends \ |
| 36 | curl |
| 37 | curl -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 |
| 38 | apt-get install -y --no-install-recommends ./libapache2-mod-auth-openidc_${MOD_AUTH_OPENIDC_VERSION}-1.$(lsb_release -sc)_${TARGETARCH}.deb |
| 39 | a2enmod auth_openidc |
| 40 | apt-get purge -y --auto-remove curl |
| 41 | apt-get clean |
| 42 | rm -rfv /var/lib/apt/lists/* libapache2-mod-auth-openidc_${MOD_AUTH_OPENIDC_VERSION}-1.$(lsb_release -sc)_${TARGETARCH}.deb |
| 43 | EOF |
| 44 | COPY --from=build --link /var/lib/openstack /var/lib/openstack |