Skip to content

Commit ca2cc2f

Browse files
authored
Merge pull request #695 from rackerlabs/fix-psutil-ironic-nautobot-client
fix: psutil in ironic nautobot client AND pip cache dir
2 parents d1cce2f + 4a65711 commit ca2cc2f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

containers/ironic-nautobot-client/Dockerfile.ironic-nautobot-client

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ ARG BASE=ghcr.io/rackerlabs/understack/python3.11.8-alpine3.19:latest
22
FROM ${BASE} AS builder
33

44
RUN --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 \
1212
COPY --chown=appuser:appgroup python/understack-workflows /app
1313
COPY --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
1717
RUN 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/
2424
COPY --from=builder /app/dist/*.whl /app/dist/requirements.txt /opt/venv/wheels/
2525
COPY --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

2929
USER appuser

containers/python311_alpine/Dockerfile.python311_alpine

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ CMD ["python", "-"]
2626
# FROM ghcr.io/rackerlabs/understack/python3.11.8-alpine3.19
2727
#
2828
# RUN --mount=type=cache,target=/var/cache/apk apk add --virtual build-deps gcc python3-dev musl-dev linux-headers
29-
# RUN --mount=type=cache,target=/root/.cache/.pip pip install --no-cache-dir python-ironicclient==5.4.0
29+
# RUN --mount=type=cache,target=/root/.cache/pip pip install --no-cache-dir python-ironicclient==5.4.0
3030
#
3131
# FROM ghcr.io/rackerlabs/understack/python3.11.8-alpine3.19 as prod
3232
# ENV PATH="/opt/venv/bin:$PATH"

containers/python312_alpine/Dockerfile.python312_alpine

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ CMD ["python", "-"]
2626
# FROM ghcr.io/rackerlabs/understack/python3.12.2-alpine3.19
2727
#
2828
# RUN --mount=type=cache,target=/var/cache/apk apk add --virtual build-deps gcc python3-dev musl-dev linux-headers
29-
# RUN --mount=type=cache,target=/root/.cache/.pip pip install --no-cache-dir python-ironicclient==5.4.0
29+
# RUN --mount=type=cache,target=/root/.cache/pip pip install --no-cache-dir python-ironicclient==5.4.0
3030
#
3131
# FROM ghcr.io/rackerlabs/understack/python3.12.2-alpine3.19 as prod
3232
# ENV PATH="/opt/venv/bin:$PATH"

0 commit comments

Comments
 (0)