mirror of
https://github.com/ps5-linux/ps5-linux-image.git
synced 2026-07-15 21:42:27 +00:00
image-builder: CACHEBUST arg to force-rebuild umoci layer
One org runner has a broken cached layer for the umoci install (runc: "/bin/sh: no such file"). Pass a unique build-arg each invocation so that layer + downstream get rebuilt fresh, while the heavy apt install above stays cached.
This commit is contained in:
@@ -355,7 +355,8 @@ fi
|
|||||||
|
|
||||||
# --- Step 2: Build distribution image ---
|
# --- Step 2: Build distribution image ---
|
||||||
run_stage "Build image builder image" \
|
run_stage "Build image builder image" \
|
||||||
docker build --pull -t ps5-image-builder -f "$SCRIPT_DIR/docker/image-builder/Dockerfile" "$SCRIPT_DIR"
|
docker build --pull --build-arg "CACHEBUST=$(date +%s)" \
|
||||||
|
-t ps5-image-builder -f "$SCRIPT_DIR/docker/image-builder/Dockerfile" "$SCRIPT_DIR"
|
||||||
|
|
||||||
if [ "$DISTRO" = "all" ]; then
|
if [ "$DISTRO" = "all" ]; then
|
||||||
DOCKER_ARGS=(
|
DOCKER_ARGS=(
|
||||||
|
|||||||
@@ -35,7 +35,13 @@ RUN mkdir -p /root/go/src/github.com/lxc/ && \
|
|||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
skopeo \
|
skopeo \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
RUN go install github.com/opencontainers/umoci/cmd/umoci@v0.5.0 && \
|
# CACHEBUST: one of the org runners has a broken cached layer for the umoci
|
||||||
|
# install that fails with `/bin/sh: no such file`. Pass a fresh value via
|
||||||
|
# `docker build --build-arg CACHEBUST=$(date +%s)` to force rebuild of this
|
||||||
|
# step (the apt installs above stay cached).
|
||||||
|
ARG CACHEBUST=0
|
||||||
|
RUN echo "cachebust=$CACHEBUST" && \
|
||||||
|
go install github.com/opencontainers/umoci/cmd/umoci@v0.5.0 && \
|
||||||
cp /root/go/bin/umoci /usr/local/bin/umoci && \
|
cp /root/go/bin/umoci /usr/local/bin/umoci && \
|
||||||
rm -rf /root/go/pkg
|
rm -rf /root/go/pkg
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user