How do you run a docker image app1 in detached mode and name the container mycontainer1?
Experience Level: Junior
Tags: DockerDocker CLI
Answer
Run the following command:
docker run -d --name=mycontainer1 app1
Related Docker job interview questions
How can you add comments to your Dockerfile?
Docker SeniorHow do you write a list of all running Docker containers to a file file.txt?
DockerDocker CLI JuniorHow do you display logs of a docker container?
DockerDocker CLI JuniorHow do you send a locally build image img1 to a docker registry reg.local:5000?
DockerDocker CLIKubernetes JuniorHow do you tag a docker image img1:latest using a tag v12?
DockerDocker CLI Junior