Mohammed Naser | aa48ddb | 2023-12-30 00:11:22 -0500 | [diff] [blame] | 1 | VERSION 0.7 |
| 2 | |
Mohammed Naser | c639230 | 2024-01-04 00:43:02 -0500 | [diff] [blame] | 3 | build: |
| 4 | ARG RELEASE |
| 5 | FROM ../cloud-archive-base+image --RELEASE=${RELEASE} |
| 6 | DO ../+APT_INSTALL --PACKAGES "\ |
| 7 | build-essential \ |
| 8 | curl \ |
| 9 | git \ |
| 10 | libldap2-dev \ |
| 11 | libpcre3-dev \ |
| 12 | libsasl2-dev \ |
| 13 | libssl-dev \ |
| 14 | lsb-release \ |
| 15 | openssh-client \ |
| 16 | python3 \ |
| 17 | python3-dev \ |
| 18 | python3-pip \ |
| 19 | python3-venv" |
| 20 | RUN --mount type=cache,target=/root/.cache \ |
| 21 | python3 -m venv --upgrade --system-site-packages /var/lib/openstack |
| 22 | ENV UWSGI_PROFILE_OVERRIDE=ssl=true |
| 23 | RUN --mount type=cache,target=/root/.cache \ |
| 24 | mkdir -p /wheels && \ |
| 25 | /var/lib/openstack/bin/pip3 wheel --wheel-dir /wheels uwsgi |
| 26 | COPY ${RELEASE}/upper-constraints.txt /upper-constraints.txt |
| 27 | ARG PROJECT |
| 28 | ARG PROJECT_REF |
| 29 | ARG PROJECT_REPO=https://opendev.org/openstack/${PROJECT} |
| 30 | GIT CLONE --branch ${PROJECT_REF} ${PROJECT_REPO} /src |
| 31 | RUN \ |
| 32 | cd /src && \ |
| 33 | git fetch --unshallow |
| 34 | ARG EXTRAS="" |
| 35 | ARG PIP_PACKAGES="" |
| 36 | RUN --mount=type=cache,target=/root/.cache \ |
| 37 | /var/lib/openstack/bin/pip3 install \ |
| 38 | --constraint /upper-constraints.txt \ |
| 39 | --find-links /wheels/ \ |
| 40 | pymysql \ |
| 41 | python-memcached \ |
| 42 | cryptography \ |
| 43 | uwsgi \ |
| 44 | /src${EXTRAS} \ |
| 45 | ${PIP_PACKAGES} |
| 46 | SAVE ARTIFACT /var/lib/openstack venv |
| 47 | |
Mohammed Naser | aa48ddb | 2023-12-30 00:11:22 -0500 | [diff] [blame] | 48 | image: |
| 49 | ARG RELEASE |
| 50 | FROM ../cloud-archive-base+image --RELEASE=${RELEASE} |
Mohammed Naser | aa48ddb | 2023-12-30 00:11:22 -0500 | [diff] [blame] | 51 | ARG PROJECT |
| 52 | ARG PROJECT_REF |
| 53 | ARG PIP_PACKAGES |
| 54 | DO ../+CREATE_PROJECT_USER --PROJECT=${PROJECT} |
| 55 | ENV PATH=/var/lib/openstack/bin:$PATH |
| 56 | COPY \ |
Mohammed Naser | c639230 | 2024-01-04 00:43:02 -0500 | [diff] [blame] | 57 | (+build/venv --RELEASE=${RELEASE} --PROJECT=${PROJECT} --PROJECT_REF=${PROJECT_REF} --PIP_PACKAGES=${PIP_PACKAGES}) \ |
Mohammed Naser | aa48ddb | 2023-12-30 00:11:22 -0500 | [diff] [blame] | 58 | /var/lib/openstack |
Mohammed Naser | c639230 | 2024-01-04 00:43:02 -0500 | [diff] [blame] | 59 | LABEL org.opencontainers.image.source=https://github.com/vexxhost/atmosphere |