Script Arguments
Commandline arguments for the zwift.sh script are forwarded to the container tool and the container entrypoint.
- Arguments that appear before
--are forwarded to the container tool. These arguments behave the same as if they were set in theCONTAINER_EXTRA_ARGSenvironment variable. - Arguments that appear after
--are forwarded to the container entrypoint.
foo@bar:~$ zwift container tool args -- container entrypoint args
Examples
Pass extra arguments to the container tool
foo@bar:~$ zwift --cpus=1.5
foo@bar:~$ CONTAINER_EXTRA_ARGS="--cpus=1.5" zwift
The above two commands do exactly the same.
Pass extra arguments to the container entrypoint
foo@bar:~$ zwift -- --update
--update is an argument to the entrypoint script that runs inside the container.
Pass extra arguments to both the container tool and the container entrypoint
foo@bar:~$ zwift --cpus=1.5 -- --update
Limit the number of cpu cores and pass --update as argument to the entrypoint script.
Set an environment variable and print it inside the container
foo@bar:~$ INTERACTIVE=1 zwift --env HELLO="Hello, world!" -- -c 'echo "$HELLO"'
INTERACTIVE=1enables interactive mode (-it) and sets the entrypoint to /bin/bash--env HELLO="Hello, world!"passes the environment variableHELLOto the container-c 'echo "$HELLO"'is passed to the /bin/bash entrypoint in the container, it executes theecho "$HELLO"command inside the container, which will printHello, world!