Docker basic commands (podman)

  Docker basic commands. Also use full for podman.

  • docker search <image-name> - search for image in docker-hub

  • docker run <options> <image-name> - by default docker will run command foreground. For running background use -d option, -it interact with the container instead of just seeing the output, --name option for giving friendly name when lunching container

  • docker logs <friendly-name|container-id> - container standard err or standard out messages

  • docker inspect <friendly-name|container-id> - more detailed information about running container

  • docker ps - list all running docker containers

  • docker run -p <host-port>:<container-port> - define ports you want to bind, when running conatiner

  • docker port <friendly-name|container-id> - list port mappings or a specific port mapping for container

  • -v <host-dir>:<container-dir> - mounts container-dir to host-dir

  • docker stop <friendly-name|container-id> - stopping running container


Popular posts from this blog

First week in new Job

My RHCSA certificate