@@ -2,8 +2,8 @@ ARG BASE=ghcr.io/rackerlabs/understack/python3.11.8-alpine3.19:latest
22FROM ${BASE} AS builder
33
44RUN --mount=type=cache,target=/var/cache/apk apk add --virtual build-deps gcc python3-dev musl-dev linux-headers
5- RUN --mount=type=cache,target=/root/.cache/. pip pip install 'wheel==0.43.0'
6- RUN --mount=type=cache,target=/root/.cache/. pip \
5+ RUN --mount=type=cache,target=/root/.cache/pip pip install 'wheel==0.43.0'
6+ RUN --mount=type=cache,target=/root/.cache/pip \
77 python -m venv /opt/poetry && \
88 /opt/poetry/bin/pip install 'poetry==1.7.1' && \
99 /opt/poetry/bin/poetry self add 'poetry-dynamic-versioning[plugin]==1.3.0'
@@ -12,7 +12,7 @@ RUN --mount=type=cache,target=/root/.cache/.pip \
1212COPY --chown=appuser:appgroup python/understack-workflows /app
1313COPY --chown=appuser:appgroup python/understack-flavor-matcher /understack-flavor-matcher
1414# need netifaces built as a wheel
15- RUN --mount=type=cache,target=/root/.cache/. pip pip wheel --wheel-dir /app/dist netifaces psutil
15+ RUN --mount=type=cache,target=/root/.cache/pip pip wheel --wheel-dir /app/dist netifaces psutil==6.1.1
1616# build wheels and requirements.txt, skip hashes due to building of netifaces above which won't match
1717RUN cd /app && /opt/poetry/bin/poetry build -f wheel && /opt/poetry/bin/poetry export --without-hashes -f requirements.txt -o dist/requirements.txt
1818
@@ -24,6 +24,6 @@ RUN mkdir -p /opt/venv/wheels/
2424COPY --from=builder /app/dist/*.whl /app/dist/requirements.txt /opt/venv/wheels/
2525COPY --chown=appuser:appgroup python/understack-flavor-matcher /understack-flavor-matcher
2626
27- RUN --mount=type=cache,target=/root/.cache/. pip /opt/venv/bin/pip install --find-links /opt/venv/wheels/ --only-binary netifaces psutil -r /opt/venv/wheels/requirements.txt understack-workflows
27+ RUN --mount=type=cache,target=/root/.cache/pip /opt/venv/bin/pip install --find-links /opt/venv/wheels/ --only-binary netifaces psutil -r /opt/venv/wheels/requirements.txt understack-workflows
2828
2929USER appuser
0 commit comments