Skip to content

Commit adb4496

Browse files
committed
Add support for running scripts with Apple container CLI
1 parent cc10817 commit adb4496

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

scripts/_script-wrapper.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,18 @@ elif which podman > /dev/null 2>&1; then
3333
--env RUNNING_IN_CONTAINER=true \
3434
"$DOCKER_IMAGE" \
3535
"/workspace/scripts/$SCRIPT_NAME" "$@"
36+
elif which container > /dev/null 2>&1; then
37+
container system start
38+
container run --rm \
39+
--volume "$PWD":/workspace \
40+
--env RUNNING_IN_CONTAINER=true \
41+
"$DOCKER_IMAGE" \
42+
"/workspace/scripts/$SCRIPT_NAME" "$@"
3643
else
3744
if [[ -n "$PROCESS" ]]; then
38-
echo "Either '$PROCESS', 'docker' or 'podman' has to be installed to run this script."
45+
echo "Either '$PROCESS', 'docker', 'podman' or 'container' has to be installed to run this script."
3946
else
40-
echo "Either 'docker' or 'podman' has to be installed to run this script."
47+
echo "Either 'docker', 'podman' or 'container' has to be installed to run this script."
4148
fi
4249
exit 1
4350
fi

0 commit comments

Comments
 (0)