{"id":19575624,"url":"https://github.com/husna-poyraz/docker-commands","last_synced_at":"2026-05-16T07:45:18.756Z","repository":{"id":137278761,"uuid":"584527992","full_name":"Husna-POYRAZ/docker-commands","owner":"Husna-POYRAZ","description":"This repository was created to explain the most commonly used docker commands.","archived":false,"fork":false,"pushed_at":"2023-01-08T22:08:49.000Z","size":29,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-09T04:21:53.379Z","etag":null,"topics":["docker","docker-commands","docker-container","docker-image","docker-registry"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Husna-POYRAZ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-02T20:32:59.000Z","updated_at":"2023-01-06T21:52:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"b0cfef6b-fb77-416c-a107-6561d6afcdfa","html_url":"https://github.com/Husna-POYRAZ/docker-commands","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Husna-POYRAZ%2Fdocker-commands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Husna-POYRAZ%2Fdocker-commands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Husna-POYRAZ%2Fdocker-commands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Husna-POYRAZ%2Fdocker-commands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Husna-POYRAZ","download_url":"https://codeload.github.com/Husna-POYRAZ/docker-commands/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240842413,"owners_count":19866574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-commands","docker-container","docker-image","docker-registry"],"created_at":"2024-11-11T06:48:57.621Z","updated_at":"2026-05-16T07:45:18.706Z","avatar_url":"https://github.com/Husna-POYRAZ.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Commands\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/75911392/210276325-68a1f015-9777-4e12-a894-95cb4a68ddff.png\" class=\"center\"/\u003e\n\u003c/p\u003e\n\n\n| Commands                                    | Description                                       | Example                                               |                                                                                         \n| --------------------------------------------| --------------------------------------------------|-------------------------------------------------------|\n| `docker version`                            | Show the Docker version information\n| `docker pull \u003cimage_name\u003e`                  | Pull an image or a repository from a registry     | `docker pull ubuntu`  \n| `docker run \u003cimage_name\u003e`                   | Run a command in a new container                  | `docker run ubuntu`\n| `docker run \u003cimage_name\u003e:\u003cimage_version\u003e`   | Run a command in a new container with the specified version | `docker run ubuntu:20.04`\n| `docker run -p \u003cOUTSIDE_PORT\u003e:\u003cINSIDE_PORT\u003e \u003cimage_name\u003e`| Publish a container's port(s) to the host | `docker run -p 8080:80 webApp`\n| `docker run --detach \u003cimage_name\u003e` or `docker run -d \u003cimage_name\u003e`| Run container in background and print container ID | `docker run -d redis`\n| `docker --attach \u003ccontainer_id\u003e` or `docker -a \u003ccontainer_id\u003e` | Attach to STDIN, STDOUT or STDERR    | `docker --attach 9cd`\n| `docker container logs \u003ccontainer_id\u003e`      | Fetch the logs of a container                     | `docker container logs 9cd`\n| `docker run \u003cimage_name\u003e sleep \u003cwait_time\u003e` | Run a command in a new container until the wait time | `docker run ubuntu sleep 10`\n| `docker run -it \u003cimage_name\u003e`               | Run command in a new container and get inside that container| `docker run -it ubuntu`\n| `docker run --name \u003ccreate_container_name\u003e -it \u003cimage_name`| Assign the container name using the image, run and get inside that container| `docker run --name bash_ubuntu -it ubuntu`\n| `docker start \u003ccontainer_name\u003e`             | Start one or more stopped containers with container name | `docker start bash_ubuntu`\n| `docker stop \u003ccontainer_name\u003e` or `docker stop \u003ccontainer_id\u003e`             | Stop one or more stopped containers with container name/id  | `docker stop bash_ubuntu`\n| `docker rm \u003ccontainer_name\u003e`or `docker rm \u003ccontainer_id\u003e`                  | Remove one or more containers with container name/id | `docker rm bash_ubuntu`\n| `docker container rm $(docker container ls -aq)`                           | Remove all running or not running containers \n| `docker ps` or `docker container ls`        | List only shows running containers by default\n| `docker ps -a`, `docker ps --all` or `docker container ls -a`| List all running or not running containers\n| `docker images`                             | List the most recently created images\n| `docker rmi \u003cimage_name\u003e` or `docker rmi \u003cimage_id\u003e`| Remove the docker image                    | `docker rmi ubuntu`\n| `docker image tag \u003cimage_name\u003e \u003ccreate_tag_name\u003e`   | Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE | `docker image tag ubuntu my-ubuntu`\n| `exit`                                      | Exit docker container                              |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhusna-poyraz%2Fdocker-commands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhusna-poyraz%2Fdocker-commands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhusna-poyraz%2Fdocker-commands/lists"}