{"id":19436618,"url":"https://github.com/vin-dkr/docker","last_synced_at":"2026-05-06T19:06:16.125Z","repository":{"id":252894169,"uuid":"841819425","full_name":"vin-dKR/docker","owner":"vin-dKR","description":"docker implementation","archived":false,"fork":false,"pushed_at":"2024-08-18T16:24:10.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-10T15:12:25.401Z","etag":null,"topics":["docker","docker-compose","docker-container","docker-image"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/vin-dKR.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":"2024-08-13T05:31:48.000Z","updated_at":"2024-08-25T17:17:30.000Z","dependencies_parsed_at":"2024-11-10T15:22:10.578Z","dependency_job_id":null,"html_url":"https://github.com/vin-dKR/docker","commit_stats":null,"previous_names":["vin-dkr/docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vin-dKR%2Fdocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vin-dKR%2Fdocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vin-dKR%2Fdocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vin-dKR%2Fdocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vin-dKR","download_url":"https://codeload.github.com/vin-dKR/docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240619428,"owners_count":19830204,"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-compose","docker-container","docker-image"],"created_at":"2024-11-10T15:12:04.578Z","updated_at":"2026-05-06T19:06:16.085Z","avatar_url":"https://github.com/vin-dKR.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Docker Basic Commands\n\n#### 1. Docker Images\n* `docker images`: Lists all the images available on the system.\n* `docker pull \u003cimage_name\u003e`: Pulls an image from Docker Hub.\n* `docker rmi \u003cimage_name\u003e`: Removes an image from the system.\n\n#### 2. Docker Containers\n* `docker ps`: Lists all running containers.\n* `docker ps -a`: Lists all containers, including stopped ones.\n* `docker run \u003cimage_name\u003e`: Runs a new container from an image.\n* `docker run -p \u003chost_port\u003e:\u003ccontainer_port\u003e \u003cimage_name\u003e`: Runs a new container with port mapping.\n* `docker stop \u003ccontainer_id\u003e`: Stops a running container.\n* `docker start \u003ccontainer_id\u003e`: Starts a stopped container.\n* `docker rm \u003ccontainer_id\u003e`: Removes a container.\n\n#### 3. Building Images\n* `docker build -t \u003cimage_name\u003e .`: Builds an image from the current directory.\n* `docker build -t \u003cimage_name\u003e -f Dockerfile .`: Builds an image from a specific Dockerfile.\n\n#### 4. Running Images\n* `docker run -d \u003cimage_name\u003e`: Runs a container in detached mode.\n* `docker run -it \u003cimage_name\u003e`: Runs a container in interactive mode.\n\n#### 5. Pushing to Docker Hub\n* `docker login`: Logs in to Docker Hub.\n* `docker tag \u003cimage_name\u003e \u003cusername\u003e/\u003cimage_name\u003e`: Tags an image for Docker Hub.\n* `docker push \u003cusername\u003e/\u003cimage_name\u003e`: Pushes an image to Docker Hub.\n\n#### 6. Optimizing Dockerfile with Layers\n* `docker system prune -a`: Removes all unused images.\n* `docker system prune -af`: Forces the removal of all unused images.\n* `docker system prune -af \u0026\u0026 docker system prune -af`: Removes all unused images and then forces the removal again to ensure all layers are removed.\n\n#### 7. Networks\n* `docker network create \u003cnetwork_name\u003e`: Creates a new network.\n* `docker network connect \u003cnetwork_name\u003e \u003ccontainer_id\u003e`: Connects a container to a network.\n* `docker network disconnect \u003cnetwork_name\u003e \u003ccontainer_id\u003e`: Disconnects a container from a network.\n\n#### 8. Volumes\n* `docker volume create \u003cvolume_name\u003e`: Creates a new volume.\n* `docker volume prune -a`: Removes all unused volumes.\n* `docker volume prune -af`: Forces the removal of all unused volumes.\n\n#### 9. Docker Compose\n* `docker-compose up`: Starts all services defined in docker-compose.yml.\n* `docker-compose down`: Stops all services defined in docker-compose.yml.\n* `docker-compose ps`: Lists all services defined in docker-compose.yml.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvin-dkr%2Fdocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvin-dkr%2Fdocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvin-dkr%2Fdocker/lists"}