{"id":22558043,"url":"https://github.com/jd-apprentice/docker-for-beginners","last_synced_at":"2026-05-19T03:04:40.201Z","repository":{"id":195400260,"uuid":"692831496","full_name":"jd-apprentice/docker-for-beginners","owner":"jd-apprentice","description":"🐋 Beginner-friendly repository that provides essential resources and guides for individuals new to Docker, helping them grasp containerization concepts and get started with Docker quickly and easily.","archived":false,"fork":false,"pushed_at":"2023-11-05T21:35:27.000Z","size":521,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T11:34:46.427Z","etag":null,"topics":["docker"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jd-apprentice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-09-17T18:02:39.000Z","updated_at":"2023-09-17T18:41:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"135efb5f-9c72-4bee-9ce9-383791c45276","html_url":"https://github.com/jd-apprentice/docker-for-beginners","commit_stats":null,"previous_names":["jd-apprentice/docker-for-beginners"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jd-apprentice/docker-for-beginners","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-apprentice%2Fdocker-for-beginners","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-apprentice%2Fdocker-for-beginners/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-apprentice%2Fdocker-for-beginners/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-apprentice%2Fdocker-for-beginners/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jd-apprentice","download_url":"https://codeload.github.com/jd-apprentice/docker-for-beginners/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-apprentice%2Fdocker-for-beginners/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267527835,"owners_count":24102019,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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"],"created_at":"2024-12-07T20:11:06.707Z","updated_at":"2026-05-19T03:04:40.168Z","avatar_url":"https://github.com/jd-apprentice.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐋 Docker for beginners\n\n\u003eDisclaimer: This is more of a practical repository than a tutorial. I will not go into the details of how Docker works, but rather how to use it. If you dont understand something, please refer to the [official documentation](https://docs.docker.com/).\n\n## 📖 Resources\n\n- [cheat-sheet](https://docs.docker.com/get-started/docker_cheatsheet.pdf)\n- [docker-in-100seconds](https://www.youtube.com/watch?v=Gjnup-PuquQ)\n\n## 📚 Table of Contents\n\n1. Downloading Docker\n2. Running your first container\n3. Building your own image\n4. Docker Compose\n5. Docker Hub\n\n## 📥 Downloading Docker\n\nDocker is available for Windows, Mac and Linux. You can download it [here](https://www.docker.com/products/docker-desktop).\n\n## 🏃‍♂️ Running your first container\n\nAfter installing Docker, you can run your first container by running the following command:\n\n```bash\ndocker run hello-world\n```\n\nThis will download the image `hello-world` from Docker Hub and run it. You should see the following output:\n\n```bash\nHello from Docker!\nThis message shows that your installation appears to be working correctly.\n```\n\n## 🏗 Building your own image\n\nNow that you have run your first container, you can build your own image. To do so, you need to create a `Dockerfile` in the root of your project. This file will contain the instructions to build your image. For example, if you want to create a simple web server with Node.js, you can use the following `Dockerfile`:\n\n```dockerfile\nFROM node:alpine3.18\nWORKDIR /app\nCOPY package.json package-lock.json ./\nRUN npm install\nCOPY . .\nEXPOSE 3000\nCMD [\"npm\", \"start\"]\n```\n\nThis file will tell Docker to use the `node:12-alpine` image as a base, create a directory `/app`, copy the `package.json` and `package-lock.json` files to the `/app` directory, install the dependencies, copy the rest of the files to the `/app` directory, expose the port `3000` and run the command `npm start` when the container starts.\n\nNow that you have created the `Dockerfile`, you can build the image by running the following command:\n\n```bash\ndocker build -t my-nodejs-app .\n```\n\nThis will build the image and tag it as `my-nodejs-app`. You can now run the container by running the following command:\n\n```bash\ndocker run -p 3000:3000 my-nodejs-app\n```\n\nThis will run the container and map the port `3000` of the container to the port `3000` of your machine. You should now be able to access the web server at `http://localhost:3000`.\n\n## 🐳 Docker Compose\n\nDocker Compose is a tool for defining and running multi-container Docker applications. You can use it to run multiple containers at once. For example, if you want to run a web server and a database, you can use the following `docker-compose.yml` file:\n\n```yaml\nversion: \"3.8\"\nservices:\n  web:\n    build:\n        context: .\n        dockerfile: Dockerfile ## We use the Dockerfile we created earlier\n    ports:\n      - \"3000:3000\"\n\n  ## To read about the postgres image, go to https://hub.docker.com/_/postgres\n  db:\n    image: postgres:12-alpine\n    environment:\n      POSTGRES_USER: postgres\n      POSTGRES_PASSWORD: postgres\n      POSTGRES_DB: mydb\n    volumes:\n      - db-data:/var/lib/postgresql/data\n```\n\nYou can now run the containers by running the following command:\n\n```bash\ndocker compose up -d\n```\n\nThis will run the containers in the background. You can now access the web server at `http://localhost:3000` and the database at `localhost:5432`.\n\n## 📦 Docker Hub\n\nDocker Hub is a repository for Docker images. You can use it to store your images and share them with others. To push your image to Docker Hub, you need to create an account and login to Docker Hub by running the following command:\n\n```bash\ndocker login\n```\n\nYou can now push your image to Docker Hub by running the following command:\n\n```bash\ndocker push \u003cusername\u003e/\u003cimage-name\u003e\n```\n\nYou can now pull your image from Docker Hub by running the following command:\n\n```bash\ndocker pull \u003cusername\u003e/\u003cimage-name\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjd-apprentice%2Fdocker-for-beginners","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjd-apprentice%2Fdocker-for-beginners","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjd-apprentice%2Fdocker-for-beginners/lists"}