diff --git a/argo-workflows/ironic-nautobot-sync/containers/Dockerfile.ironic b/argo-workflows/ironic-nautobot-sync/containers/Dockerfile.ironic index 9afd8ad3..22eab823 100644 --- a/argo-workflows/ironic-nautobot-sync/containers/Dockerfile.ironic +++ b/argo-workflows/ironic-nautobot-sync/containers/Dockerfile.ironic @@ -1,15 +1,16 @@ ARG BASE=ghcr.io/rackerlabs/understack/argo-python3.11.8-alpine3.19:latest FROM ${BASE} as builder -RUN --mount=type=cache,target=/var/cache/apk apk add --virtual build-deps gcc python3-dev musl-dev linux-headers -RUN --mount=type=cache,target=/root/.cache/.pip pip install python-ironicclient==5.5.0 pydantic==2.8.0 - -FROM ${BASE} as prod ARG APP_PATH=/app ARG APP_USER=appuser ARG APP_GROUP=appgroup ARG APP_USER_UID=1000 ARG APP_GROUP_GID=1000 +COPY --chown=${APP_USER}:${APP_GROUP} containers/requirements.txt /app +RUN --mount=type=cache,target=/var/cache/apk apk add --virtual build-deps gcc python3-dev musl-dev linux-headers +RUN --mount=type=cache,target=/root/.cache/.pip pip install --no-cache-dir -r /app/requirements.txt + +FROM ${BASE} as prod LABEL org.opencontainers.image.title="Python 3.11 image with Ironic Client" LABEL org.opencontainers.image.base.name="ghcr.io/rackerlabs/understack/argo-ironic-client-python3.11.8" LABEL org.opencontainers.image.source=https://github.com/rackerlabs/understack diff --git a/argo-workflows/ironic-nautobot-sync/containers/requirements.txt b/argo-workflows/ironic-nautobot-sync/containers/requirements.txt new file mode 100644 index 00000000..e5190ff8 --- /dev/null +++ b/argo-workflows/ironic-nautobot-sync/containers/requirements.txt @@ -0,0 +1,3 @@ +python-ironicclient==5.5.0 +pydantic==2.8.0 +pynautobot==2.2.0