Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions containers/ironic-nautobot-client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
ARG BASE=ghcr.io/rackerlabs/understack/python3.11.8-alpine3.19:latest
FROM ${BASE} AS builder
FROM python:3.12-slim 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=/var/cache/apt \
apt-get update && \
apt-get install -y --no-install-recommends build-essential && \
rm -rf /var/lib/apt/lists/*
RUN --mount=type=cache,target=/root/.cache/pip pip install 'wheel==0.43.0'
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

# copy in the code
COPY --chown=appuser:appgroup python/understack-workflows /tmp/understack/python/understack-workflows
COPY --chown=appuser:appgroup python/understack-flavor-matcher /tmp/understack/python/understack-flavor-matcher
COPY python/understack-workflows /tmp/understack/python/understack-workflows
COPY python/understack-flavor-matcher /tmp/understack/python/understack-flavor-matcher

# install our requirements and our packages
RUN --mount=type=cache,target=/root/.cache/uv \
uv venv /opt/venv --clear && \
uv pip install \
--python /opt/venv/bin/python \
netifaces \
psutil==6.1.1 \
/tmp/understack/python/understack-workflows \
/tmp/understack/python/understack-flavor-matcher

FROM ${BASE} AS prod
FROM python:3.12-slim AS prod
LABEL org.opencontainers.image.description="UnderStack Workflows"
ENV PATH="/opt/venv/bin:${PATH}"

RUN groupadd --system --gid 10001 appgroup && \
useradd --system --create-home --uid 10001 --gid appgroup appuser

COPY --from=builder --link /opt/venv /opt/venv

Expand Down
2 changes: 1 addition & 1 deletion python/understack-workflows/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "understack-workflows"
version = "0.0.0"
description = "The glue between different systems and services that are run in our Workflows"
authors = [{ name = "Understack Developers" }]
requires-python = "~=3.11.0"
requires-python = "~=3.12.0"
readme = "README.md"
classifiers = [
"Development Status :: 3 - Alpha",
Expand Down
Loading