{"id":21074578,"url":"https://github.com/joydeep100/dockerlearn","last_synced_at":"2026-02-19T05:32:41.576Z","repository":{"id":243282453,"uuid":"248478972","full_name":"joydeep100/DockerLearn","owner":"joydeep100","description":"Learning docker, Docker command reference.","archived":false,"fork":false,"pushed_at":"2020-04-25T14:45:24.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-20T22:39:05.134Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/joydeep100.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":"2020-03-19T10:54:21.000Z","updated_at":"2024-07-31T15:57:37.000Z","dependencies_parsed_at":"2024-06-07T20:06:32.314Z","dependency_job_id":"7825caa7-9f19-41ac-8f52-eedeb4000043","html_url":"https://github.com/joydeep100/DockerLearn","commit_stats":null,"previous_names":["joydeep100/dockrlearn","joydeep100/dockerlearn"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joydeep100%2FDockerLearn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joydeep100%2FDockerLearn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joydeep100%2FDockerLearn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joydeep100%2FDockerLearn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joydeep100","download_url":"https://codeload.github.com/joydeep100/DockerLearn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243517347,"owners_count":20303607,"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":[],"created_at":"2024-11-19T19:16:48.835Z","updated_at":"2025-10-16T20:04:59.028Z","avatar_url":"https://github.com/joydeep100.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Docker Image \u0026 Container definition\nDocker Image is a set of files which has no state, whereas Docker Container is the instantiation of Docker Image. In other words, Docker Container is the run time instance of images.\n\n## Images\n\n- docker images\t//List all images\n\n- docker rmi -f \u003cimage_name\u003e\t//To untag and remove an image\n\n## Process\n\n- docker run \u003cimage_name\u003e\t//run an instance\n\n- docker run -it \u003cimage_name\u003e\t//run in interactive mode\n\n- docker run --name \u003cname_for_container\u003e\t//give a custom name to a running container or image process\n\n- docker run -it \u003cimage_name\u003e \u003ccommand\u003e\t//you can override the default command, i.e. CMD as in Dockerfile\n\n- docker run -d \u003cimage_name\u003e\t//run detached\n\n- docker run -p \u003csrc_host_port\u003e:\u003ccontainer_host_port\u003e\t//port mapping\n\n- docker run --rm \u003cimage_name\u003e\t//will ensure the contaier related files are removed from docker daemon when the process stops, a practical way to see this is 'docker ps -a' with this flag included you can see there will be no trace here once the container is stopped\n\n- docker exec -it \u003ccontainer_id\u003e \u003ccommand\u003e\t//to get access to the running container\n\nex. ```docker exec -it efe1f0ab1991 bash```\n\n- docker attach \u003ccontainer_id\u003e\t//to attach to a detached \u0026 running container\n\n## Volumes\n\n- docker run -v \u003csrc_node_path\u003e:\u003ccontainer_node_path\u003e\t//volume mapping - use absolute and existing paths(in client node)\n\nex. ```docker run -v $(pwd):/app```\nex. ```docker run -v /app/src``` //it means do not touch this path in the target container\n\n\n## Build\n\n- docker build .\t//Ensure Dockerfile is present, '.' is the context. which means all path in local are relative to this path\n\n- docker build -f \u003cpath/to/dockerfile\u003e \u003cpath/to/context\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoydeep100%2Fdockerlearn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoydeep100%2Fdockerlearn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoydeep100%2Fdockerlearn/lists"}