Skip to content
This repository was archived by the owner on Jun 16, 2024. It is now read-only.

Commit bde0d9f

Browse files
committed
Allow changing the container command
1 parent 3233a44 commit bde0d9f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

custom_base.template.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@
88
# Mount additional volumes into the container or limit the CPU utilization.
99
# PODMAN_RUN_ARGS[0]='--volume=/mnt:/path/in/container:z'
1010
# PODMAN_RUN_ARGS[1]='--cpus=1'
11+
12+
# Change the command given to `podman run` in `prepare.sh`.
13+
# This command *must* not return or the container could stop before the
14+
# tasks are done. The default is to call `sleep` with a very long time.
15+
# PODMAN_RUN_COMMAND=/sbin/init

prepare.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ start_container() {
6363
--volume "$CACHE_DIR:/home/user/cache":z \
6464
"${PODMAN_RUN_ARGS[@]}" \
6565
"$IMAGE"\
66-
sleep 999999999
66+
"${PODMAN_RUN_COMMAND:-sleep 999999999}"
6767
}
6868

6969
install_command() {

0 commit comments

Comments
 (0)