APT
Install extra packages at startup or in a running workspace, add your own repositories, and control which packages APT may install.
Install Packages
At startup, the workspace installs the packages listed in:
WS_APT_ADDITIONAL_PACKAGES: Additional APT packages installed during startup.
WS_APT_ADDITIONAL_PACKAGES can contain one or more space-delimited package names:
docker run \
-e WS_APT_ADDITIONAL_PACKAGES="cmake nano" \
ghcr.io/kloudkit/workspace:v0.6.0💡 TIP
Some packages are already available as features, which add setup steps beyond the package itself.
Check the available features before you list a package here.
Install in a Running Workspace
The startup install of WS_APT_ADDITIONAL_PACKAGES runs the additional-apt feature playbook. Call it directly to install packages after the workspace is running, or to retry a failed startup install:
ws-cli feature install additional-apt --opt packages="vim,curl"Add Repositories
Add custom repository sources, one or more entries separated by semicolons (;):
WS_APT_ADDITIONAL_REPOS: Appends additional repository lines to/etc/apt/sources.list.
docker run \
-e WS_APT_ADDITIONAL_REPOS="deb [signed-by=/custom.gpg] https://custom.package trixie main" \
ghcr.io/kloudkit/workspace:v0.6.0Add Their GPG Keys
Some third-party repositories require you to trust their signing key. Provide additional keys as one or more space-delimited name:url pairs:
WS_APT_ADDITIONAL_GPG_KEYS: List of trusted GPG pairs.WS_APT_ADDITIONAL_INSECURE_GPG_KEYS: List of trusted GPG pairs (HTTP or insecure HTTPS).
Each key is downloaded at startup and stored in /etc/apt/keyrings/<name>.gpg. Keys must be served over HTTPS; put keys served over HTTP in WS_APT_ADDITIONAL_INSECURE_GPG_KEYS.
docker run \
-e WS_APT_ADDITIONAL_GPG_KEYS="mycorp:https://mycorp.com/pubkey.asc extras:https://extras.test/key2.asc" \
ghcr.io/kloudkit/workspace:v0.6.0Update the Package Lists
Set WS_APT_UPDATE_CACHE to true to refresh the package lists at startup, after your custom sources are added. Package installs refresh the lists on their own, so this matters only for running apt-get install by hand later.
Disable Repositories
Besides the standard sources, Kloud Workspace is set up with a range of additional repository sources, all signed with gpg keys. To disable repository sources, set:
WS_APT_DISABLE_REPOS: Disables specified APT repositories or all repositories.
It accepts debian, additional (every bundled third-party source), or true to disable them all.
Restricted Packages
The workspace runs headless, so it ships preference files that block packages with no use inside a container. These are grouped by category:
x11: X11 server, GTK/Qt toolkits, Mesadesktop: Bluetooth, Avahi, NetworkManager, wireless daemonsmail: Postfix, Exim, Sendmail, mail clientsprinting: CUPS, printer driversdaemons:systemd-timesyncd, NTP, Chronycni:containernetworking-plugins(podman defaults tonetavark)language-pack: locale packagesobsolete:anacron,at
If you need to install a package that pulls in a restricted dependency, opt out with:
WS_APT_DISABLE_RESTRICTIONS: Disables specified APT install restrictions or all restrictions.
Lift a single category, useful for installing X11 client libraries while leaving mail and printing blocked:
docker run \
-e WS_APT_DISABLE_RESTRICTIONS="x11" \
-e WS_APT_ADDITIONAL_PACKAGES="libx11-6" \
ghcr.io/kloudkit/workspace:v0.6.0Lift every restriction at once with true (or *):
docker run \
-e WS_APT_DISABLE_RESTRICTIONS=true \
ghcr.io/kloudkit/workspace:v0.6.0Override for a Single Install
To install a package blocked by a shipped restriction in a running workspace, pass override_restrictions=true:
ws-cli feature install additional-apt \
--opt packages=containernetworking-plugins \
--opt override_restrictions=trueThe restrictions are restored when the install completes (including on failure). Unlike disable_restrictions, the override applies only to this single install. For the startup equivalent:
WS_APT_OVERRIDE_RESTRICTIONS: Temporarily lifts all APT install restrictions foradditional_packages.
Default Configurations
The APT defaults keep the image small and leave your own files intact. Notable defaults include:
- The
--no-install-recommendsflag is enabled by default to avoid the installation of recommended but unnecessary packages. - When a package upgrade ships a new version of a config file you changed, APT keeps your version.