blob: 2aafc38b11437774c62a0ab0d0590a854085af72 [file] [log] [blame]
Mohammed Nasercc6868b2025-01-18 15:49:44 -05001# SPDX-FileCopyrightText: © 2025 VEXXHOST, Inc.
2# SPDX-License-Identifier: GPL-3.0-or-later
Mohammed Naser735efe22024-06-26 23:46:25 -04003# Atmosphere-Rebuild-Time: 2024-06-26T17:38:39Z
Mohammed Naserda994232024-04-13 12:34:01 -04004
Mohammed Nasercc6868b2025-01-18 15:49:44 -05005FROM openstack-venv-builder AS build
Mohammed Naser05795e52024-06-26 07:52:19 -04006ARG KEYSTONE_GIT_REF=f8f451455fb11fb177148cfb88bed29caf18d38a
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
9RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
10pip3 install \
11 --constraint /upper-constraints.txt \
12 /src/keystone[ldap] \
13 keystone-keycloak-backend==0.1.8
14EOF
15
Mohammed Nasercc6868b2025-01-18 15:49:44 -050016FROM openstack-python-runtime
Mohammed Naserda994232024-04-13 12:34:01 -040017RUN <<EOF bash -xe
18apt-get update -qq
19apt-get install -qq -y --no-install-recommends \
20 apache2 libapache2-mod-wsgi-py3
21apt-get clean
22rm -rf /var/lib/apt/lists/*
23EOF
24ARG MOD_AUTH_OPENIDC_VERSION=2.4.12.1
25ARG TARGETARCH
26RUN <<EOF bash -xe
Mohammed Nasercc6868b2025-01-18 15:49:44 -050027# TODO(mnaser): mod_auth_openidc does not have aarch64 builds
28if [ "${TARGETARCH}" = "arm64" ]; then
29 exit 0
30fi
31
Mohammed Naserda994232024-04-13 12:34:01 -040032apt-get update -qq
33apt-get install -qq -y --no-install-recommends \
34 curl
35curl -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
36apt-get install -y --no-install-recommends ./libapache2-mod-auth-openidc_${MOD_AUTH_OPENIDC_VERSION}-1.$(lsb_release -sc)_${TARGETARCH}.deb
37a2enmod auth_openidc
38apt-get purge -y --auto-remove curl
39apt-get clean
40rm -rfv /var/lib/apt/lists/* libapache2-mod-auth-openidc_${MOD_AUTH_OPENIDC_VERSION}-1.$(lsb_release -sc)_${TARGETARCH}.deb
41EOF
42COPY --from=build --link /var/lib/openstack /var/lib/openstack