June 2018
Intermediate to advanced
596 pages
12h 39m
English
Here is a short list of Docker commands for operations such as start, stop, and delete:
|
Operation |
Command |
|
Run a container from an image |
The syntax is as follows: docker run –name <container_name> <options> <base_image> <command_to_run> For example, to run a container from an Ubuntu image, open a Terminal and execute the bash shell with the following command: docker run -name my-ubuntu -it ubuntu bash |
|
Create an image from a Dockerfile |
The syntax is as follows: docker build <options> <folder_of_dockerfile> For example, to create my_image from a Dockerfile in the current folder, run the following Docker command: docker build -t image_name |
|
List currently running containers |
docker ps |
|
List all containers, ... |