{"id":15141769,"url":"https://github.com/safwanuddinmairaj/docker-getting-started","last_synced_at":"2026-01-30T14:16:44.011Z","repository":{"id":254318740,"uuid":"846151264","full_name":"SafwanUddinMairaj/Docker-Getting-Started","owner":"SafwanUddinMairaj","description":"Getting started with Docker and containers concept.","archived":false,"fork":false,"pushed_at":"2024-08-22T17:17:36.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-14T00:04:20.994Z","etag":null,"topics":["containerization","docker","docker-image","dockerfile"],"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/SafwanUddinMairaj.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-22T16:20:22.000Z","updated_at":"2024-08-22T17:19:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"0a3f9d02-3086-4ef0-a375-cacf74d1f1d1","html_url":"https://github.com/SafwanUddinMairaj/Docker-Getting-Started","commit_stats":null,"previous_names":["safwanuddinmairaj/docker-getting-started"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SafwanUddinMairaj/Docker-Getting-Started","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SafwanUddinMairaj%2FDocker-Getting-Started","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SafwanUddinMairaj%2FDocker-Getting-Started/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SafwanUddinMairaj%2FDocker-Getting-Started/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SafwanUddinMairaj%2FDocker-Getting-Started/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SafwanUddinMairaj","download_url":"https://codeload.github.com/SafwanUddinMairaj/Docker-Getting-Started/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SafwanUddinMairaj%2FDocker-Getting-Started/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259737916,"owners_count":22903871,"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":["containerization","docker","docker-image","dockerfile"],"created_at":"2024-09-26T09:01:51.074Z","updated_at":"2026-01-30T14:16:43.981Z","avatar_url":"https://github.com/SafwanUddinMairaj.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"## INSTALL DOCKER\r\n\r\nA very detailed instructions to install Docker are provide in the below link\r\n\r\nhttps://docs.docker.com/get-docker/\r\n\r\nFor Demo, \r\n\r\ncreate an Ubuntu EC2 Instance on AWS and run the below commands to install docker.\r\n\r\n```\r\nsudo apt update\r\nsudo apt install docker.io -y\r\n```\r\n\r\n\r\n### Start Docker and Grant Access\r\n\r\nEnsure the docker daemon is up and running.\r\n\r\nA easy way to verify Docker installation is by running the below command\r\n\r\n```\r\ndocker run hello-world\r\n```\r\n\r\nIf the output:\r\n\r\n```\r\ndocker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post \"http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create\": dial unix /var/run/docker.sock: connect: permission denied.\r\nSee 'docker run --help'.\r\n```\r\n\r\nThis can mean two things, \r\n1. Docker deamon is not running.\r\n2. user does not have access to run docker commands.\r\n\r\n\r\n### Start Docker daemon\r\n\r\nUse the below command to verify if the docker daemon is actually started and Active\r\n\r\n```\r\nsudo systemctl status docker\r\n```\r\n\r\nIf you notice that the docker daemon is not running, start the daemon using the below command\r\n\r\n```\r\nsudo systemctl start docker\r\n```\r\n\r\n\r\n### Grant Access to your user to run docker commands\r\n\r\nTo grant access to the user to run the docker command, you should add the user to the Docker Linux group. Docker group is created by default when docker is installed.\r\n\r\n```\r\nsudo usermod -aG docker ubuntu\r\n```\r\n\r\nIn the above command `ubuntu` is the name of the user, you can change the username appropriately.\r\n\r\n**NOTE:** : After doing the above process, Logout and login back for the changes to be reflected.\r\n\r\n\r\n### Docker is Installed, up and running!\r\n\r\nUse the same command again, to verify that docker is up and running.\r\n\r\n```\r\ndocker run hello-world\r\n```\r\n\r\nOutput should look like:\r\n\r\n```\r\n....\r\n....\r\nHello from Docker!\r\nThis message shows that your installation appears to be working correctly.\r\n...\r\n...\r\n```\r\n\r\n\r\n## You can start with this repository to write your first Dockerfile.\r\n\r\n### Clone this repository:\r\n\r\n```\r\ngit clone https://github.com/SafwanUddinMairaj/Docker-Getting-Started.git\r\n\r\n```\r\n\r\n### Login to Docker [Create an account with https://hub.docker.com/]\r\n\r\n```\r\ndocker login\r\n```\r\n\r\n```\r\nLogin with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.\r\nUsername: [your-username]\r\nPassword: [your-password]\r\nWARNING! Your password will be stored unencrypted in /home/ubuntu/.docker/config.json.\r\nConfigure a credential helper to remove this warning. See\r\nhttps://docs.docker.com/engine/reference/commandline/login/#credentials-store\r\n\r\nLogin Succeeded\r\n```\r\n\r\n### Build your first Docker Image\r\n\r\nChange the username accoringly in the below command\r\n\r\n```\r\ndocker build -t [your-username]/first-docker-image:latest .\r\n```\r\n\r\nOutput of the above command\r\n\r\n```\r\n    Sending build context to Docker daemon     64kB\r\nStep 1/6 : FROM ubuntu:latest\r\n ---\u003e edbfe74c41f8\r\nStep 2/6 : WORKDIR /app\r\n ---\u003e Using cache\r\n ---\u003e 057588ee13a5\r\nStep 3/6 : COPY . /app\r\n ---\u003e Using cache\r\n ---\u003e 670dc1e9ea6b\r\nStep 4/6 : RUN apt-get update \u0026\u0026 apt-get install -y python3 python3-pip\r\n ---\u003e Using cache\r\n ---\u003e 97cf4b7c64c8\r\nStep 5/6 : ENV NAME World\r\n ---\u003e Using cache\r\n ---\u003e 41124e768175\r\nStep 6/6 : CMD [\"python3\", \"app.py\"]\r\n ---\u003e Using cache\r\n ---\u003e b95a7687c066\r\nSuccessfully built b95a7687c066\r\nSuccessfully tagged [your-username]/first-docker-image:latest\r\n\r\n\r\n```\r\n\r\n### Verify Docker Image is created\r\n\r\n```\r\ndocker images\r\n```\r\n\r\nOutput \r\n\r\n```\r\nREPOSITORY                        TAG       IMAGE ID       CREATED          SIZE\r\nyour-username/first-docker-image  latest    b95a7687c066   21 minutes ago   573MB\r\nubuntu                            latest    edbfe74c41f8   3 weeks ago      78.1MB\r\nhello-world                       latest    d2c94e258dcb   15 months ago    13.3kB\r\n\r\n```\r\n\r\n### Run your First Docker Container\r\n\r\n```\r\ndocker run -it [your-username]/my-first-docker-image\r\n```\r\n\r\nOutput\r\n\r\n```\r\nHello World\r\n```\r\n\r\n### Push the Image to DockerHub and share it with the world\r\n\r\n```\r\ndocker push [your-username]/first-docker-image\r\n```\r\n\r\nOutput\r\n\r\n```\r\nUsing default tag: latest\r\nThe push refers to repository [docker.io/your-username/first-docker-image]\r\n4395a4727380: Pushed\r\n48c1988c5c93: Pushed\r\n85463bd6b633: Pushed\r\nf36fd4bb7334: Mounted from library/ubuntu\r\nlatest: digest: sha256:a779ba5a9320c157e6ad7784c09ad9b15392346f69a5822a68b16cf73e78119c size: 1157\r\n\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafwanuddinmairaj%2Fdocker-getting-started","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsafwanuddinmairaj%2Fdocker-getting-started","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafwanuddinmairaj%2Fdocker-getting-started/lists"}