{"id":24896936,"url":"https://github.com/alpha951/dockerizing-basic-node-server","last_synced_at":"2026-05-03T16:32:28.433Z","repository":{"id":193831906,"uuid":"689577474","full_name":"alpha951/dockerizing-basic-node-server","owner":"alpha951","description":"A basic project to learn about docker. This can be referred as tutorial to create a dockerize container from github","archived":false,"fork":false,"pushed_at":"2023-09-10T13:34:53.000Z","size":38,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T16:50:46.048Z","etag":null,"topics":["docker","docker-container","docker-image","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/alpha951.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":"2023-09-10T08:57:22.000Z","updated_at":"2023-09-10T09:15:09.000Z","dependencies_parsed_at":"2025-03-27T16:41:41.143Z","dependency_job_id":"f87654b4-e25f-4e42-aa76-8fae25a14b71","html_url":"https://github.com/alpha951/dockerizing-basic-node-server","commit_stats":null,"previous_names":["alpha951/dockerizing-basic-node-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alpha951/dockerizing-basic-node-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha951%2Fdockerizing-basic-node-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha951%2Fdockerizing-basic-node-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha951%2Fdockerizing-basic-node-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha951%2Fdockerizing-basic-node-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alpha951","download_url":"https://codeload.github.com/alpha951/dockerizing-basic-node-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha951%2Fdockerizing-basic-node-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32577121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: 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-container","docker-image","dockerfile"],"created_at":"2025-02-01T20:15:54.200Z","updated_at":"2026-05-03T16:32:28.411Z","avatar_url":"https://github.com/alpha951.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Dockerfile to build a container image from this github repo\n\n```dockerfile\nFROM node\n\nWORKDIR /developer/nodejs/app_from_github\n\nRUN apt-get update \u0026\u0026 apt-get install -y git\n\nRUN git clone https://github.com/alpha951/dockerizing-basic-node-server.git .\n\nRUN git pull origin main\n\nENV PORT=3000\n\nRUN npm ci\n\nCMD [\"npm\", \"start\"]\n```\n\n## Build the image\n\n```bash\n\ndocker build -t nodejs-app-from-github .\n\n```\n\n## Run the container\n\n```bash\n\ndocker run -it --init --publish 5000:3000 app-from-github:latest\n\n```\n\u003e The server will run at port 5000 in the host machine\n\n\u003e EXPOSE 3000 also can be used to expose the port 3000 in the container to the host \n\n## To bind the container with host directory\n\nThis command also make sure if there is any change in the project files inside the container then they will be reflected in the host machine. So it's a two way binding.\n\n```bash\ndocker run -it --init --publish 5000:3000 -v \"$(pwd)\":developer/nodejs/app_from_github app-from-github:latest\n\n```\n\n## Prune the docker system\n\n```bash\ndocker system prune -a\n```\n\n## Docker Volume\n\nIt's is used to persist the data in the container. It's a way to store the data in the host machine. So if the container is deleted then the data will be still there in the host machine.\nAlso if the container is binded with the host directory then the data will be stored in the host machine. So node_modules can create conflict while running in the container. \n    \n```bash\ndocker volume create node_modules_volume\n\n```\n\n## Comunication between containers\n\n```bash\n\ndocker network create microservice-network\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpha951%2Fdockerizing-basic-node-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falpha951%2Fdockerizing-basic-node-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpha951%2Fdockerizing-basic-node-server/lists"}