Docker How To Start A Container
Starting a Docker container is really easy.
This command will start an existing Docker container named ‘smelly-hippo’:
docker start smelly-hippo
You can verify that the container has been started by checking all containers:
docker ps -a
You can also stop the container like this:
docker stop smelly-hippo
If the container doesn’t exist yet you can create it with this command:
docker create -ti ubuntu
If you want to create and run a container in one shot you can do it like this:
docker run -tid ubuntu
You can also give your container a specific name like this:
docker run -tid --name smelly-hippo ubuntu