Run a container from an image
docker run -name learn -i -t rbnics/rbnics /bin/bash
-name learn
specifies the name of the container-i
keeps STDIN open even if not attached-t
allocates a pseudo-TTY/bin/bash
is the command name after the container
startsrbnics/rbnics
is the image nameReferences
container-selinux >= 2.9
You need to install the latest epel repo to install the required
version of container-selinux
.
Remember to add the user to the docker group to avoid
sudo
.
sudo usermod -aG docker $USER
Edit the config /etc/docker/daemon.json
to add
{
"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn/"]
}
Then restart docker
sudo systemctl restart docker