In this section, we will take a look at commands and arguments in docker
$ docker run ubuntu
$ docker ps
$ docker ps -a
Containers are meant to run a specific task or process such as to host an instance of a webserver or application server or a database server etc.
$ docker run ubuntu sleep 5
This way when the container starts it runs the sleep program, waits for 5 seconds and then exists. How do you make that change permanent?
There are different ways of specifying the command either the command simply as is in a shell form or in a JSON array format.
$ docker build -t ubuntu-sleeper .
$ docker run ubuntu-sleeper