Skip to content

Commit 44110b1

Browse files
committed
cache python packages for speedup(DOCKER_BUILDKIT=1)
Signed-off-by: Oleksander Piskun <[email protected]>
1 parent 1eba35d commit 44110b1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
FROM python:3.11-slim-bookworm
1+
FROM python:3.12-slim-bookworm
22

33
RUN apt-get update && apt-get install -y curl procps && \
44
apt-get clean && \
55
rm -rf /var/lib/apt/lists/*
66

77
COPY requirements.txt /
88

9-
RUN \
10-
python3 -m pip install -r requirements.txt && rm -rf ~/.cache && rm requirements.txt
9+
RUN --mount=type=cache,target=/root/.cache/pip \
10+
python3 -m pip install -r requirements.txt && rm requirements.txt
1111

1212
ADD /ex_app/cs[s] /ex_app/css
1313
ADD /ex_app/im[g] /ex_app/img

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ help:
3131
.PHONY: build-push
3232
build-push:
3333
docker login ghcr.io
34-
docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/nextcloud/app-skeleton-python:latest .
34+
DOCKER_BUILDKIT=1 docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/nextcloud/app-skeleton-python:latest .
3535

3636
.PHONY: run30
3737
run29:

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nc_py_api[app]>=0.19.1
1+
nc_py_api[app]>=0.19.2

0 commit comments

Comments
 (0)