File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -428,6 +428,23 @@ if [ -n "${from}" ]; then
428
428
429
429
. ${temprcconf}
430
430
431
+ if [ -n "$from_md5" -a -n "${BUILDAH_CMD}" ]; then
432
+ JQ_CMD=$( which jq )
433
+
434
+ ${BUILDAH_CMD} --root ${workdir}/basejail/buildah images -n | while read _path _tag _image_id _rest; do
435
+ _md5_ver=$(${miscdir}/cbsd_md5 "${_path}:${_tag}")
436
+ _md5_nover=$(${miscdir}/cbsd_md5 "${_path}")
437
+ if [ "${from_md5}" = "${_md5_ver}" -o "${from_md5}" = "${_md5_nover}" ]; then
438
+ _exec_start=$(${BUILDAH_CMD} --root ${workdir}/basejail/buildah inspect ${_image_id} \
439
+ | ${JQ_CMD} -r '.OCIv1.config | (.Env + .Entrypoint + .Cmd) | map("\"" + . + "\"") | join(" ")' \
440
+ )
441
+
442
+ jset jname=${jname} exec_start="/bin/env ${_exec_start}" exec_stop="/bin/kill -TERM 1"
443
+ break
444
+ fi
445
+ done
446
+ fi
447
+
431
448
for i in ${MYOPTARG}; do
432
449
case "${i}" in
433
450
jname|from|removejconf)
You can’t perform that action at this time.
0 commit comments