Shrinkwrap uses a “runtime” to execute all of its shell commands and allows the user to choose which runtime to use. Both the design and implementation of this is borrowed from Tuxmake.
Shrinkwrap supports the following set of runtimes:
Shell commands are executed natively on the user’s system. The user is responsible for ensuring the the required toolchain, environment variables and any other dependencies are set up.
(default). Shell commands are executed in a docker container. By default, the official shrinkwrap image will be pulled and used, which contains all dependencies already setup.
Like docker, but will only look for the container image on the local system. Will not attempt to pull over the network.
Shell commands are executed in a podman container. By default, the official shrinkwrap image will be pulled and used, which contains all dependencies already setup.
Like podman, but will only look for the container image on the local system. Will not attempt to pull over the network.
The desired runtime can be specified using the
--runtime option, which is a
top-level argument (must come before the command):
shrinkwrap --runtime=<name> ...
If using a container runtime (anything other than null), a custom image can optionally be specified. If omitted, the official shrinkwrap image is used:
shrinkwrap --runtime=<name> --image=<name> ...
Container Image Variants
Shrinkwrap runs on both x86_64 and aarch64 architectures, and provides multiarch
container images so that the correct variant is automatically selected for your
platform. Images are automatically downloaded by shrinkwrap when the
podman runtime is selected. Images are available on Docker Hub and can be
freely downloaded without the need for an account.
There is currently no FVP available for aarch64, so the current aarch64 arch
images do not include any FVP, and as a consequence, the
run command will
not work. For the time being, when wanting to run on aarch64 you must install
your own FVP on your system and follow the recipe at
Use a Custom FVP Version.
Contains all toolchains and other dependencies required to build all standard configs. Can be used as a base to create an image with a custom FVP.
(default). As per
The best way to understand the requirements for the packages available within
the runtime is to look at the dockerfiles for the official shrinkwrap images.
These are available at
Build Container Image Locally
If you have a need to build the shrinkwrap container images on your local system, you can do it as follows:
This will build a set of images called:
To use a locally built image, call shrinkwrap as follows if running on an x86_64 system:
shrinkwrap --runtime=<name> --image=shrinkwraptool/base-slim:local-x86_64 ...
Or like this if running on an aarch64 system:
shrinkwrap --runtime=<name> --image=shrinkwraptool/base-slim:local-aarch64 ...