Make final dl cache image FROM scratch

This commit is contained in:
BtbN 2023-06-21 00:38:32 +02:00
parent 73f17b7213
commit 0598fb3dba
5 changed files with 6 additions and 6 deletions

View file

@ -52,8 +52,8 @@ to_df "FROM base AS intermediate"
cat Dockerfile.dl.final >> "$TODF" cat Dockerfile.dl.final >> "$TODF"
rm Dockerfile.dl.final rm Dockerfile.dl.final
to_df "FROM base" to_df "FROM scratch"
to_df "COPY --from=intermediate \$FFBUILD_DLDIR/. \$FFBUILD_DLDIR" to_df "COPY --from=intermediate /opt/ffdl/. /"
if [[ "$TARGET" == "dl" && "$VARIANT" == "only" ]]; then if [[ "$TARGET" == "dl" && "$VARIANT" == "only" ]]; then
exit 0 exit 0

View file

@ -8,7 +8,7 @@ ffbuild_enabled() {
} }
ffbuild_dockerstage() { ffbuild_dockerstage() {
to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=\$FFBUILD_DLDIR,dst=\$FFBUILD_DLDIR,from=${DL_IMAGE},rw --mount=src=patches/aom,dst=/patches run_stage /stage.sh" to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=/,dst=\$FFBUILD_DLDIR,from=${DL_IMAGE},rw --mount=src=patches/aom,dst=/patches run_stage /stage.sh"
} }
ffbuild_dockerbuild() { ffbuild_dockerbuild() {

View file

@ -8,7 +8,7 @@ ffbuild_enabled() {
} }
ffbuild_dockerstage() { ffbuild_dockerstage() {
to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=\$FFBUILD_DLDIR,dst=\$FFBUILD_DLDIR,from=${DL_IMAGE},rw --mount=src=patches/aribb24,dst=/patches run_stage /stage.sh" to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=/,dst=\$FFBUILD_DLDIR,from=${DL_IMAGE},rw --mount=src=patches/aribb24,dst=/patches run_stage /stage.sh"
} }
ffbuild_dockerbuild() { ffbuild_dockerbuild() {

View file

@ -8,7 +8,7 @@ ffbuild_enabled() {
} }
ffbuild_dockerstage() { ffbuild_dockerstage() {
to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=\$FFBUILD_DLDIR,dst=\$FFBUILD_DLDIR,from=${DL_IMAGE},rw --mount=src=patches/zvbi,dst=/patches run_stage /stage.sh" to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=/,dst=\$FFBUILD_DLDIR,from=${DL_IMAGE},rw --mount=src=patches/zvbi,dst=/patches run_stage /stage.sh"
} }
ffbuild_dockerdl() { ffbuild_dockerdl() {

View file

@ -53,7 +53,7 @@ ffbuild_dockerlayer_dl() {
} }
ffbuild_dockerstage() { ffbuild_dockerstage() {
to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=\$FFBUILD_DLDIR,dst=\$FFBUILD_DLDIR,from=${DL_IMAGE},rw run_stage /stage.sh" to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=/,dst=\$FFBUILD_DLDIR,from=${DL_IMAGE},rw run_stage /stage.sh"
} }
ffbuild_dockerlayer() { ffbuild_dockerlayer() {