blob: 103adfe6f9fa0729ab5acbf54fbfa4df46cac67c [file] [log] [blame]
Mohammed Naserd28fbaf2024-04-08 17:15:00 -04001# Copyright (c) 2024 VEXXHOST, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
Mohammed Naser19c6c8a2024-04-18 01:47:10 -040015ARG RELEASE
16
17FROM registry.atmosphere.dev/library/ubuntu:${RELEASE} AS helm
Mohammed Naserd28fbaf2024-04-08 17:15:00 -040018ARG TARGETOS
19ARG TARGETARCH
20ARG HELM_VERSION=3.14.0
21ADD https://get.helm.sh/helm-v${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz /helm.tar.gz
22RUN tar -xzf /helm.tar.gz
23RUN mv /${TARGETOS}-${TARGETARCH}/helm /usr/bin/helm
24
Mohammed Naser19c6c8a2024-04-18 01:47:10 -040025FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
Mohammed Naserd28fbaf2024-04-08 17:15:00 -040026ARG MAGNUM_GIT_REF=0ee979099a01ae2c8b1b5d6757897a8993e4e34c
27ADD --keep-git-dir=true https://opendev.org/openstack/magnum.git#${MAGNUM_GIT_REF} /src/magnum
28RUN git -C /src/magnum fetch --unshallow
29COPY patches/magnum /patches/magnum
30RUN git -C /src/magnum apply --verbose /patches/magnum/*
31RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
32pip3 install \
33 --constraint /upper-constraints.txt \
34 /src/magnum \
35 magnum-cluster-api==0.16.0
36EOF
37
Mohammed Naser19c6c8a2024-04-18 01:47:10 -040038FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
Mohammed Naserd28fbaf2024-04-08 17:15:00 -040039RUN <<EOF bash -xe
40apt-get update -qq
41apt-get install -qq -y --no-install-recommends \
42 haproxy
43apt-get clean
44rm -rf /var/lib/apt/lists/*
45EOF
46COPY --from=helm --link /usr/bin/helm /usr/local/bin/helm
47COPY --from=build --link /var/lib/openstack /var/lib/openstack