Introduction to Docker - Day 2

For second day of Introduction to Docker, we will learn how to run the docker test app with name option. After that, we discuss about pulling an actual docker application and we will learn the naming convention of docker image. Run with Name Option We start by running hello-world app without any option. Run the test app as follows: docker run hello-world List the container: docker container ls -a The result should be as follows: We then remove the container using the ID or the name cranky_brahmagupta . This name is created randomly by the system if we failed to supply a name. Now, we remove the container as follows: docker rm cranky_brahmagupta To run the container and supply a name, we use the option --name follow by a single space and the custom name. See example below: docker run --name simple hello-world List the container docker container ls -a The result is as follows: Please note that the name of the container will be the name that ...