-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instead of deleting the caches, we use the new dockerfile syntax to make docker aware of the cache paths. For local builds, it should work out of the box, but in the ci it needs to be adjusted. Possibly it won't make things faster there, as the build there is distributed
- Loading branch information
Showing
2 changed files
with
19 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
FROM keppel.eu-de-1.cloud.sap/ccloud-dockerhub-mirror/library/python:3.10-slim | ||
# syntax = docker/dockerfile:1.2 | ||
ARG BASE=keppel.eu-de-1.cloud.sap/ccloud-dockerhub-mirror/library/python:3.10-slim | ||
FROM $BASE | ||
LABEL source_repository="https://github.com/sapcc/vcenter-operator" | ||
|
||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
ADD . /usr/src/app | ||
RUN ./build.sh | ||
ENV SRC_DIR=/usr/src/vcenter-operator | ||
ENV PIP_CACHE_DIR=/var/cache/pip | ||
RUN mkdir -p $PIP_CACHE_DIR $SRC_DIR | ||
|
||
WORKDIR $SRC_DIR | ||
ADD . $SRC_DIR | ||
|
||
RUN --mount=type=cache,target=${PIP_CACHE_DIR},sharing=locked \ | ||
--mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
./build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters