blob: eca883df2d25590b591e9f0f0b4c56b2f2b89383 [file] [log] [blame]
Mohammed Naserda994232024-04-13 12:34:01 -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
15FROM registry.atmosphere.dev/library/ubuntu:main AS helm
16ARG TARGETOS
17ARG TARGETARCH
18ARG HELM_VERSION=3.14.0
19ADD https://get.helm.sh/helm-v${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz /helm.tar.gz
20RUN tar -xzf /helm.tar.gz
21RUN mv /${TARGETOS}-${TARGETARCH}/helm /usr/bin/helm
22
23FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
24ARG MAGNUM_GIT_REF=c613ea4e419edc0086116da07e93cf19206746e1
25ADD --keep-git-dir=true https://opendev.org/openstack/magnum.git#${MAGNUM_GIT_REF} /src/magnum
26RUN git -C /src/magnum fetch --unshallow
27RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
28pip3 install \
29 --constraint /upper-constraints.txt \
30 /src/magnum \
31 magnum-cluster-api==0.16.0
32EOF
33
34FROM registry.atmosphere.dev/library/openstack-python-runtime:main
35RUN <<EOF bash -xe
36apt-get update -qq
37apt-get install -qq -y --no-install-recommends \
38 haproxy
39apt-get clean
40rm -rf /var/lib/apt/lists/*
41EOF
42COPY --from=helm --link /usr/bin/helm /usr/local/bin/helm
43COPY --from=build --link /var/lib/openstack /var/lib/openstack