{"id":21588996,"url":"https://github.com/0prashantyadav0/docker","last_synced_at":"2026-04-27T18:31:56.513Z","repository":{"id":242399730,"uuid":"809368304","full_name":"0PrashantYadav0/Docker","owner":"0PrashantYadav0","description":"New in DevOps visit this repo to get started with docker.","archived":false,"fork":false,"pushed_at":"2024-06-09T17:22:36.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-20T15:49:16.853Z","etag":null,"topics":["docker","docker-with-node","docker-with-python","dockerfile"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/0PrashantYadav0.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-06-02T13:52:33.000Z","updated_at":"2024-06-16T09:30:47.000Z","dependencies_parsed_at":"2024-06-09T18:39:26.515Z","dependency_job_id":null,"html_url":"https://github.com/0PrashantYadav0/Docker","commit_stats":null,"previous_names":["0prashantyadav0/docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/0PrashantYadav0/Docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0PrashantYadav0%2FDocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0PrashantYadav0%2FDocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0PrashantYadav0%2FDocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0PrashantYadav0%2FDocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0PrashantYadav0","download_url":"https://codeload.github.com/0PrashantYadav0/Docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0PrashantYadav0%2FDocker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32349417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T17:12:42.749Z","status":"ssl_error","status_checked_at":"2026-04-27T17:12:41.658Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","docker-with-node","docker-with-python","dockerfile"],"created_at":"2024-11-24T16:12:12.217Z","updated_at":"2026-04-27T18:31:56.498Z","avatar_url":"https://github.com/0PrashantYadav0.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Don't forgot to put a star on this.\n\nIf you want to pull my image from docker hub, you can use the following command:\n\n### For Python Docker Image\n\n```bash\ndocker pull 0prashantyadav0/python-docker-demo:0.0.1.RELEASE\ndocker run -d -p 8000:8000 0prashantyadav0/python-docker-demo:0.0.1.RELEASE\n```\n\n### For Node Docker Image\n\n```bash\ndocker pull 0prashantyadav0/node-docker-demo:0.0.1.RELEASE\ndocker run -d -p 3000:3000 0prashantyadav0/node-docker-demo:0.0.1.RELEASE\n```\n\n**Creating Custom Docker Images**\n\nThis section serves as a comprehensive reference for building tailored Docker images using the current repository as a foundation. By following these steps, you'll be equipped to create images that encapsulate your unique application requirements:\n\n**1. Prerequisites:**\n\n- **Docker Installation:** Ensure Docker is installed and running on your system. Refer to the official Docker documentation for installation instructions specific to your operating system: [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)\n- **Dockerfile Familiarity:** Possess a basic understanding of Dockerfiles, the text files defining image creation instructions. A wealth of resources are available online to delve deeper into Dockerfiles: [https://docs.docker.com/reference/dockerfile/](https://docs.docker.com/reference/dockerfile/)\n\n**2. Building Your Image:**\n\nNavigate to the root directory of your project or to the directory containing your Dockerfile using your terminal. Then, execute the following command to initiate the image building process:\n\n```bash\ndocker build -t \u003cusername\u003e/\u003cimage-name\u003e:version .\n```\n\n**Explanation:**\n\n- `docker build`: This command triggers the Docker image building process.\n- `-t \u003cusername\u003e/\u003cimage-name\u003e:version`:\n  - `\u003cusername\u003e`: Replace this with your Docker Hub username or a private registry address.\n  - `\u003cimage-name\u003e`: Provide the desired name for your image. Choose a descriptive and meaningful name.\n  - `:version`: Specify a version tag for your image. You can utilize a versioning scheme that aligns with your project's release cycle (e.g., `0.1.0`, `1.2.3-beta`).\n\n**3. (Optional) Tagging and Pushing (for Sharing):**\n\nIf you intend to share your image with others on Docker Hub or a private registry, you'll need to tag and push it. Here's the process:\n\n**a. Tagging:**\n\n- Assign a more specific tag (e.g., `latest`) using the `docker tag` command:\n\n```bash\ndocker tag \u003cusername\u003e/\u003cimage-name\u003e:version \u003cusername\u003e/\u003cimage-name\u003e:latest\n```\n\n**b. Pushing (Assuming Docker Hub Authentication):**\n\n- Log in to Docker Hub using the `docker login` command before pushing:\n\n```bash\ndocker login\n```\n\n- Push the image to your repository:\n\n```bash\ndocker push \u003cusername\u003e/\u003cimage-name\u003e:version\ndocker push \u003cusername\u003e/\u003cimage-name\u003e:latest\n```\n\n**4. Running the Container:**\n\nOnce your image is built, you can create a container from it and execute your application within it. Here's the command, assuming your Dockerfile exposes port 8000:\n\n```bash\ndocker container run -d -p 8000:8000 \u003cusername\u003e/\u003cimage-name\u003e:version\n```\n\n**Explanation:**\n\n- `docker container run`: This command launches a container based on the specified image.\n- `-d`: This option runs the container in detached mode, allowing you to interact with your terminal promptly after starting the container.\n- `-p 8000:8000`: This option maps the container's port 8000 (exposed by your Dockerfile) to port 8000 on your host machine. This enables you to access your application from the host at `http://localhost:8000/` (assuming your application listens on this port).\n\n**5. Managing Containers:**\n\n**Listing Running Containers:**\n\n```bash\ndocker container ls\n```\n\nThis command displays all running containers on your system, providing details like container IDs, images, ports, and names (if assigned).\n\n**Stopping a Container:**\n\n```bash\ndocker stop \u003ccontainer_name_or_id\u003e\n```\n\nThis command gracefully stops a running container. Replace `\u003ccontainer_name_or_id\u003e` with the name you assigned to the container (if any) or its container ID. You can find container IDs from the output of `docker container ls`.\n\n**Additional Considerations:**\n\n- **Dockerfile Customization:** Adapt the Dockerfile instructions within this repository to cater to your specific application's needs. This may involve installing required dependencies, copying your application code, and exposing the appropriate ports.\n- **Best Practices:** Refer to Docker best practices for creating efficient and secure images. Explore resources like the Docker documentation for in-depth guidance: [https://docs.docker.com/](https://docs.docker.com/)\n\nBy following these steps and leveraging the provided explanations, you'll be well-equipped to construct custom Docker images for your projects!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0prashantyadav0%2Fdocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0prashantyadav0%2Fdocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0prashantyadav0%2Fdocker/lists"}