Background Containers
It is also possible to run containers in the background. For this, you would use the apptainer instance start command. This starts your container and puts it in the background and returns your prompt to you. This is something you would do if you have a container that runs as a service, which means you want it running all the time and don't need to interact with it as much.
Listing Running Containers
Once you have started one or more containers running in the background, you can see what is running by using apptainer instance list, which returns you a list of the running containers.
If you want to connect to one of the running instances, you may do so by constructing a short URI for it and presenting that to the run, shell, or exec command:
In this case, run and exec will not terminate the container after executing the runscript or command.
Stopping a Container
If you decide you want to stop one of the instances, you can use apptainer instance stop followed by the name of the container you want to stop, or --all for all the containers.
CVW material development is supported by NSF OAC awards 1854828, 2321040, 2323116 (UT Austin) and 2005506 (Indiana University)