Skip to content

dev573/docker-cheat-sheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

docker-cheat-sheet

Run docker container

docker container run --publish 3000:80 --detach nginx

In the above command --publish or -p is used for port mapping, 3000 indicates for machine port and 80 indicates for conatiner internal port. --detach or -d command is used for the detaching the container, so it can run in the background.

To see the processes running inside the docker container

docker top nginx

it will list out the all processes running inside the container.

Inspect a container

docker inspect container 

Performance stats of all containers

docker stats containers

Docker network concepts

Container port

80/tcp -> 0.0.0.0:80

Container IPAddress

docker container inspect --format '{{.NetworkSettings.IPAddress}}' container

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published