Simplify download Dockerfile generation
This commit is contained in:
parent
8c336b4dec
commit
91b977f84d
1 changed files with 3 additions and 15 deletions
16
generate.sh
16
generate.sh
|
@ -41,21 +41,9 @@ to_df "FROM ${REGISTRY}/${REPO}/base:latest AS base"
|
|||
to_df "ENV TARGET=$TARGET VARIANT=$VARIANT REPO=$REPO ADDINS_STR=$ADDINS_STR"
|
||||
to_df "WORKDIR \$FFBUILD_DLDIR"
|
||||
|
||||
PREVLAYER="base"
|
||||
for ID in $(ls -1d scripts.d/??-* | sed -s 's|^.*/\(..\).*|\1|' | sort -u); do
|
||||
LAYER="layer-$ID"
|
||||
|
||||
for STAGE in scripts.d/$ID-*; do
|
||||
if [[ -f "$STAGE" ]]; then
|
||||
to_df "FROM $PREVLAYER AS $(layername "$STAGE")"
|
||||
for STAGE in scripts.d/*.sh scripts.d/*/*.sh; do
|
||||
to_df "FROM base AS $(layername "$STAGE")"
|
||||
exec_dockerstage_dl "$STAGE"
|
||||
else
|
||||
for STAGE in "${STAGE}"/??-*; do
|
||||
to_df "FROM $PREVLAYER AS $(layername "$STAGE")"
|
||||
exec_dockerstage_dl "$STAGE"
|
||||
done
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
to_df "FROM base AS intermediate"
|
||||
|
|
Loading…
Reference in a new issue