Docker Commands used in the lab - richiedennis/Tech-Journal-SYS265- GitHub Wiki
- docker version
Pretty self explanatory. Prints the version of docker that is installed on the system.
- docker run hello_world
Docker run will run a command in the container and hellow_world will print the hello world prompt from docker and display a message
- docker-compose version
Prints the version of docker-compose
- docker run --rm archlinux:latest /bin/echo "HELLO SYS265"
So the docker run portion of the commmand will run the following command in the container and -rm part of the command will automatically remove the container when it exits. Archlinux:latest is the name of the container. And bin/echo is the location of what we want to print. The rest of the command is saying to print the phrase "HELLO SYS265" within the container.
- docker images
This short command lists all the downloaded images on docker.
- docker run -d -P training/webapp python app.py
The run command will run the command within the container. -d portion will run the command in detached mode and the -P section tells docker to publish all exposed ports to random ports. The next part is the directory where the files we are looking for are located. The end of the command is pulling down everything related to the python web application.