kas-docker: Allow to define docker image revision
By default, we pull latest when running kas-docker. That may not be desired in all cases, e.g. testing different image revisions or nailing down those used in a build. Allow to override the default via the environment variable KAS_IMAGE_VERSION. For now, we stick with the default "latest", but we may also hard-code the last release here at some later point. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
fafc017392
commit
f3f004f4ea
@ -52,7 +52,11 @@ trace()
|
||||
eval "$@"
|
||||
}
|
||||
|
||||
DOCKER_IMAGE=kasproject/kas
|
||||
if [ -z "${KAS_IMAGE_VERSION}" ]; then
|
||||
KAS_IMAGE_VERSION="latest"
|
||||
fi
|
||||
|
||||
DOCKER_IMAGE=kasproject/kas:${KAS_IMAGE_VERSION}
|
||||
|
||||
if [ -n "${KAS_WORK_DIR}" ]; then
|
||||
KAS_WORK_DIR=$(readlink -f ${KAS_WORK_DIR})
|
||||
@ -64,7 +68,7 @@ fi
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
--isar)
|
||||
DOCKER_IMAGE=kasproject/kas-isar
|
||||
DOCKER_IMAGE=kasproject/kas-isar:${KAS_IMAGE_VERSION}
|
||||
if ! LOOP_DEV=$(/sbin/losetup -f 2>/dev/null); then
|
||||
if [ $(id -u) -eq 0 ]; then
|
||||
echo "Error: loop device not available!"
|
||||
|
Loading…
Reference in New Issue
Block a user