Professional Documents
Culture Documents
Docker Basics
Docker Basics
yum is the primary tool for getting, installing, deleting, querying, and
managing Red Hat Enterprise Linux RPM software packages from official Red
Hat software repositories, as well as other third-party repositories.
yum is used in Red Hat Enterprise Linux versions 5 and later. Versions of Red
Hat Enterprise Linux 4 and earlier used up2date.
Know the name of OS, Kernal version and date etc : uname -a
Start Docker on Linux: sudo service docker start
Show all docker images : docker images
Run Docker:
In Background : docker run -d -p 90:80 --name httpd-2.4.18 httpd-2.4.18:1
In interactive mode : docker run -it --rm -p 90:80 --name httpd-2.4.18 httpd-2.4.18:1
(once stopped remove automatically)
Open container terminal : docker exec -it httpd-2.4.18 bash
Docker start, stop and remove (container name is used after command not
image name)
docker start httpd-2.4.18
docker stop httpd-2.4.18
docker rm httpd-2.4.18
Running Dockers
Docker ps Shows only running docker
Docker ps a shows all docker including stopped one and started one.
Remove all the container: