ajout template
This commit is contained in:
parent
0673acfc3a
commit
55bcbacb7c
|
@ -371,7 +371,7 @@ OPTIONS
|
|||
gid="$(id -g)"
|
||||
args=(
|
||||
run -it --rm
|
||||
--name rundk
|
||||
--name "rundk-$(basename -- "$1")-$$"
|
||||
-e _RUNDK_IN_DOCKER=1
|
||||
-e _RUNDK_UID="$uid"
|
||||
-e _RUNDK_GID="$gid"
|
||||
|
@ -416,7 +416,7 @@ OPTIONS
|
|||
|
||||
args+=(
|
||||
"$IMAGE"
|
||||
exec "$MYSELF" ${Chdir:+-w "$Chdir"}
|
||||
exec "$0" ${Chdir:+-w "$Chdir"}
|
||||
)
|
||||
[ -n "$ForcedBootstrap" ] && set -- ci
|
||||
[ -n "$Verbose" ] && eecho "\$ docker ${args[*]} $*"
|
||||
|
@ -472,6 +472,6 @@ else
|
|||
if [ -n "$chdir" ]; then
|
||||
cd "$chdir" || exit 1
|
||||
fi
|
||||
command "${@:-bash}"
|
||||
exec "${@:-bash}"
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
# Modèle de script utilisant rundk pour lancer un traitement dans un container
|
||||
|
||||
MYDIR="$(dirname -- "$0")"; MYNAME="$(basename -- "$0")"
|
||||
[ -n "$_RUNDK_IN_DOCKER" ] ||
|
||||
exec "$MYDIR/rundk" --bootstrap --unless-exists --exec -- "$MYDIR/$MYNAME" "$@"
|
||||
source "$MYDIR/../vendor/nulib/php/load.sh" || exit 1
|
||||
|
||||
args=(
|
||||
"description"
|
||||
#"usage"
|
||||
)
|
||||
parse_args "$@"; set -- "${args[@]}"
|
||||
|
||||
echo "je tourne dans un container..."
|
||||
sleep 1000
|
Loading…
Reference in New Issue