Applies to SUSE Linux Enterprise Server 15 SP4
10 Working with containers #
After you have created a custom image, you can start containers based on it.
You can run an instance of the image using the docker run
command. The command accepts several arguments:
a container name (it is recommended to name your container)
a user for the container
a mount point
a host name, etc.
10.1 Starting and removing containers #
Containers normally exit when their main process finishes. For example, if a container starts a particular application, the container exits when the application quits. You can start the container again by running:
>
docker start -ai <container name>
To remove unused containers:
>
docker rm <container name>