Skip to content

Commit 185b9d7

Browse files
committed
Improve Dockerfile layer caching
1 parent f17bf4e commit 185b9d7

File tree

8 files changed

+14
-10
lines changed

8 files changed

+14
-10
lines changed

api/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ name = "api"
33
version = "0.1.0"
44

55
[build-system]
6-
requires = ["uv_build>=0.8.0,<0.9.0"]
6+
requires = ["uv_build>=0.8.11,<0.9.0"]
77
build-backend = "uv_build"

api/src/api/Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
# 0.7.19-python3.12-bookworm-slim
2-
FROM astral/uv@sha256:235c2e8419851c1d539e2b19033d56aaf82670bfaaa155e20ac6b21260dc0be9 AS builder
1+
# 0.8.11-python3.12-bookworm-slim
2+
FROM astral/uv@sha256:165703e3c12d7fca3dfa15b2012b98d6e03c261a516d4bd7ca3a956c57c7abce AS builder
33

44
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy UV_PYTHON_DOWNLOADS=0
55

66
WORKDIR /app
7+
RUN --mount=type=cache,target=/root/.cache/uv \
8+
--mount=type=bind,source=uv.lock,target=uv.lock \
9+
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
10+
uv sync --locked --no-install-project --no-dev
711
COPY pyproject.toml uv.lock ./
812
COPY api api
913
COPY domain domain
1014
RUN --mount=type=cache,target=/root/.cache/uv \
1115
uv sync --locked --no-dev
1216

1317
# 3.12.11-slim-bookworm
14-
FROM python@sha256:4600f71648e110b005bf7bca92dbb335e549e6b27f2e83fceee5e11b3e1a4d01 AS final
18+
FROM python@sha256:42cf2422587a3dac0e0a3674a4d86f01570d5d7260588f3845f51e6176d8134b AS final
1519

1620
ENV COMMON__ENVIRONMENT=""
1721

common/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ name = "common"
33
version = "0.1.0"
44

55
[build-system]
6-
requires = ["uv_build>=0.8.0,<0.9.0"]
6+
requires = ["uv_build>=0.8.11,<0.9.0"]
77
build-backend = "uv_build"

domain/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ name = "domain"
33
version = "0.1.0"
44

55
[build-system]
6-
requires = ["uv_build>=0.8.0,<0.9.0"]
6+
requires = ["uv_build>=0.8.11,<0.9.0"]
77
build-backend = "uv_build"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dev = [
2929
]
3030

3131
[tool.uv]
32-
required-version = ">=0.8.0,<0.9.0"
32+
required-version = ">=0.8.11,<0.9.0"
3333

3434
[tool.uv.workspace]
3535
members = ["api", "domain", "transcriber", "test_utils", "common", "scripts"]

test_utils/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ name = "test-utils"
33
version = "0.1.0"
44

55
[build-system]
6-
requires = ["uv_build>=0.8.0,<0.9.0"]
6+
requires = ["uv_build>=0.8.11,<0.9.0"]
77
build-backend = "uv_build"

transcriber/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ name = "transcriber"
33
version = "0.1.0"
44

55
[build-system]
6-
requires = ["uv_build>=0.8.0,<0.9.0"]
6+
requires = ["uv_build>=0.8.11,<0.9.0"]
77
build-backend = "uv_build"

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)