|
1 | 1 | # serializer version: 1 |
2 | 2 | # name: test_workflows_container[3.12-3.10] |
3 | 3 | ''' |
4 | | - FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim |
| 4 | + FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS builder |
5 | 5 |
|
6 | 6 | WORKDIR /app |
7 | 7 |
|
8 | 8 | # Install dependencies first (cached layer, only invalidated by pyproject.toml changes) |
9 | | - COPY pyproject.toml ./ |
| 9 | + COPY pyproject.toml README.md . |
10 | 10 | RUN --mount=type=cache,target=/root/.cache/uv \ |
11 | 11 | uv sync --no-dev --no-install-project |
12 | 12 |
|
13 | 13 | # Copy source and install project |
14 | 14 | COPY pkfire/ ./pkfire/ |
15 | 15 | RUN --mount=type=cache,target=/root/.cache/uv \ |
16 | | - uv sync --no-dev |
| 16 | + uv sync --no-dev --no-editable |
| 17 | + |
| 18 | + FROM python:3.12-slim |
| 19 | + |
| 20 | + COPY --from=builder /app/.venv /app/.venv |
17 | 21 |
|
18 | 22 | RUN useradd --no-create-home --shell /bin/false app |
19 | 23 | USER app |
20 | 24 |
|
21 | | - CMD ["uv", "run", "python", "-m", "pkfire"] |
| 25 | + CMD ["/app/.venv/bin/python", "-m", "pkfire"] |
22 | 26 |
|
23 | 27 | ''' |
24 | 28 | # --- |
25 | 29 | # name: test_workflows_container[3.12-3.12] |
26 | 30 | ''' |
27 | | - FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim |
| 31 | + FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS builder |
28 | 32 |
|
29 | 33 | WORKDIR /app |
30 | 34 |
|
31 | 35 | # Install dependencies first (cached layer, only invalidated by pyproject.toml changes) |
32 | | - COPY pyproject.toml ./ |
| 36 | + COPY pyproject.toml README.md . |
33 | 37 | RUN --mount=type=cache,target=/root/.cache/uv \ |
34 | 38 | uv sync --no-dev --no-install-project |
35 | 39 |
|
36 | 40 | # Copy source and install project |
37 | 41 | COPY pkfire/ ./pkfire/ |
38 | 42 | RUN --mount=type=cache,target=/root/.cache/uv \ |
39 | | - uv sync --no-dev |
| 43 | + uv sync --no-dev --no-editable |
| 44 | + |
| 45 | + FROM python:3.12-slim |
| 46 | + |
| 47 | + COPY --from=builder /app/.venv /app/.venv |
40 | 48 |
|
41 | 49 | RUN useradd --no-create-home --shell /bin/false app |
42 | 50 | USER app |
43 | 51 |
|
44 | | - CMD ["uv", "run", "python", "-m", "pkfire"] |
| 52 | + CMD ["/app/.venv/bin/python", "-m", "pkfire"] |
45 | 53 |
|
46 | 54 | ''' |
47 | 55 | # --- |
48 | 56 | # name: test_workflows_container[3.14-3.10] |
49 | 57 | ''' |
50 | | - FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim |
| 58 | + FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim AS builder |
51 | 59 |
|
52 | 60 | WORKDIR /app |
53 | 61 |
|
54 | 62 | # Install dependencies first (cached layer, only invalidated by pyproject.toml changes) |
55 | | - COPY pyproject.toml ./ |
| 63 | + COPY pyproject.toml README.md . |
56 | 64 | RUN --mount=type=cache,target=/root/.cache/uv \ |
57 | 65 | uv sync --no-dev --no-install-project |
58 | 66 |
|
59 | 67 | # Copy source and install project |
60 | 68 | COPY pkfire/ ./pkfire/ |
61 | 69 | RUN --mount=type=cache,target=/root/.cache/uv \ |
62 | | - uv sync --no-dev |
| 70 | + uv sync --no-dev --no-editable |
| 71 | + |
| 72 | + FROM python:3.14-slim |
| 73 | + |
| 74 | + COPY --from=builder /app/.venv /app/.venv |
63 | 75 |
|
64 | 76 | RUN useradd --no-create-home --shell /bin/false app |
65 | 77 | USER app |
66 | 78 |
|
67 | | - CMD ["uv", "run", "python", "-m", "pkfire"] |
| 79 | + CMD ["/app/.venv/bin/python", "-m", "pkfire"] |
68 | 80 |
|
69 | 81 | ''' |
70 | 82 | # --- |
71 | 83 | # name: test_workflows_container[3.14-3.12] |
72 | 84 | ''' |
73 | | - FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim |
| 85 | + FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim AS builder |
74 | 86 |
|
75 | 87 | WORKDIR /app |
76 | 88 |
|
77 | 89 | # Install dependencies first (cached layer, only invalidated by pyproject.toml changes) |
78 | | - COPY pyproject.toml ./ |
| 90 | + COPY pyproject.toml README.md . |
79 | 91 | RUN --mount=type=cache,target=/root/.cache/uv \ |
80 | 92 | uv sync --no-dev --no-install-project |
81 | 93 |
|
82 | 94 | # Copy source and install project |
83 | 95 | COPY pkfire/ ./pkfire/ |
84 | 96 | RUN --mount=type=cache,target=/root/.cache/uv \ |
85 | | - uv sync --no-dev |
| 97 | + uv sync --no-dev --no-editable |
| 98 | + |
| 99 | + FROM python:3.14-slim |
| 100 | + |
| 101 | + COPY --from=builder /app/.venv /app/.venv |
86 | 102 |
|
87 | 103 | RUN useradd --no-create-home --shell /bin/false app |
88 | 104 | USER app |
89 | 105 |
|
90 | | - CMD ["uv", "run", "python", "-m", "pkfire"] |
| 106 | + CMD ["/app/.venv/bin/python", "-m", "pkfire"] |
91 | 107 |
|
92 | 108 | ''' |
93 | 109 | # --- |
94 | 110 | # name: test_workflows_container[No maximum-3.10] |
95 | 111 | ''' |
96 | | - FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim |
| 112 | + FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim AS builder |
97 | 113 |
|
98 | 114 | WORKDIR /app |
99 | 115 |
|
100 | 116 | # Install dependencies first (cached layer, only invalidated by pyproject.toml changes) |
101 | | - COPY pyproject.toml ./ |
| 117 | + COPY pyproject.toml README.md . |
102 | 118 | RUN --mount=type=cache,target=/root/.cache/uv \ |
103 | 119 | uv sync --no-dev --no-install-project |
104 | 120 |
|
105 | 121 | # Copy source and install project |
106 | 122 | COPY pkfire/ ./pkfire/ |
107 | 123 | RUN --mount=type=cache,target=/root/.cache/uv \ |
108 | | - uv sync --no-dev |
| 124 | + uv sync --no-dev --no-editable |
| 125 | + |
| 126 | + FROM python:3.14-slim |
| 127 | + |
| 128 | + COPY --from=builder /app/.venv /app/.venv |
109 | 129 |
|
110 | 130 | RUN useradd --no-create-home --shell /bin/false app |
111 | 131 | USER app |
112 | 132 |
|
113 | | - CMD ["uv", "run", "python", "-m", "pkfire"] |
| 133 | + CMD ["/app/.venv/bin/python", "-m", "pkfire"] |
114 | 134 |
|
115 | 135 | ''' |
116 | 136 | # --- |
117 | 137 | # name: test_workflows_container[No maximum-3.12] |
118 | 138 | ''' |
119 | | - FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim |
| 139 | + FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim AS builder |
120 | 140 |
|
121 | 141 | WORKDIR /app |
122 | 142 |
|
123 | 143 | # Install dependencies first (cached layer, only invalidated by pyproject.toml changes) |
124 | | - COPY pyproject.toml ./ |
| 144 | + COPY pyproject.toml README.md . |
125 | 145 | RUN --mount=type=cache,target=/root/.cache/uv \ |
126 | 146 | uv sync --no-dev --no-install-project |
127 | 147 |
|
128 | 148 | # Copy source and install project |
129 | 149 | COPY pkfire/ ./pkfire/ |
130 | 150 | RUN --mount=type=cache,target=/root/.cache/uv \ |
131 | | - uv sync --no-dev |
| 151 | + uv sync --no-dev --no-editable |
| 152 | + |
| 153 | + FROM python:3.14-slim |
| 154 | + |
| 155 | + COPY --from=builder /app/.venv /app/.venv |
132 | 156 |
|
133 | 157 | RUN useradd --no-create-home --shell /bin/false app |
134 | 158 | USER app |
135 | 159 |
|
136 | | - CMD ["uv", "run", "python", "-m", "pkfire"] |
| 160 | + CMD ["/app/.venv/bin/python", "-m", "pkfire"] |
137 | 161 |
|
138 | 162 | ''' |
139 | 163 | # --- |
0 commit comments