Nota: As of version c34c3b1, this tool is experimental. The interface is subject to radical change in the future.
The purpose of
guix container is to manipulate processes running
within an isolated environment, commonly known as a “container”, typically
created by the
guix shell (veja Invoking
guix shell) and
guix system container (veja Invoking
guix system) commands.
The general syntax is:
guix container action options…
action specifies the operation to perform with a container, and options specifies the context-specific arguments for the action.
The following actions are available:
Execute a command within the context of a running container.
The syntax is:
guix container exec pid program arguments…
pid specifies the process ID of the running container. program specifies an executable file name within the root file system of the container. arguments are the additional options that will be passed to program.
The following command launches an interactive login shell inside a Guix
system container, started by
guix system container, and whose
process ID is 9001:
guix container exec 9001 /run/current-system/profile/bin/bash --login
Note that the pid cannot be the parent process of a container. It must be PID 1 of the container or one of its child processes.