{"id":24911660,"url":"https://github.com/svolodarskyi/dockerize-node-js","last_synced_at":"2026-05-04T20:33:17.876Z","repository":{"id":209730404,"uuid":"724815498","full_name":"svolodarskyi/dockerize-node-js","owner":"svolodarskyi","description":"This repository demonstrates the Dockerization of a Node.js application. ","archived":false,"fork":false,"pushed_at":"2023-11-29T04:49:59.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T19:57:49.265Z","etag":null,"topics":["docker","docker-image","dockerfile","nodejs"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/svolodarskyi.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-11-28T21:11:04.000Z","updated_at":"2023-11-29T00:40:54.000Z","dependencies_parsed_at":"2025-03-28T03:25:20.828Z","dependency_job_id":"0673355b-2aca-415b-85ab-87f327a52576","html_url":"https://github.com/svolodarskyi/dockerize-node-js","commit_stats":null,"previous_names":["svolodarskyi/create-docker-image-node-js","svolodarskyi/dockerize-node-js"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/svolodarskyi/dockerize-node-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svolodarskyi%2Fdockerize-node-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svolodarskyi%2Fdockerize-node-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svolodarskyi%2Fdockerize-node-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svolodarskyi%2Fdockerize-node-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svolodarskyi","download_url":"https://codeload.github.com/svolodarskyi/dockerize-node-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svolodarskyi%2Fdockerize-node-js/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266437378,"owners_count":23928238,"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-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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","docker-image","dockerfile","nodejs"],"created_at":"2025-02-02T04:29:21.489Z","updated_at":"2026-05-04T20:33:12.853Z","avatar_url":"https://github.com/svolodarskyi.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node.js App Dockerization\nThe project is designed to showcase the process of containerizing a Node.js application using Docker and the Alpine Linux distribution.\n\n## Project Overview\n\nThe Node.js app included in this repository serves as a basic example, and the Dockerfile provided outlines the steps to create a Docker image capable of running the application. By utilizing the lightweight Node.js 19 Alpine image, the resulting Docker container ensures efficiency and a minimal footprint.\n\n## Dockerfile Configuration\n\nThe Dockerfile includes instructions for copying application files, setting the working directory, installing dependencies, and starting the Node.js application. It serves as a blueprint for containerizing Node.js projects and can be adapted for real-world applications.\n\n## Getting Started\n\nFollow the instructions in the Dockerfile to build the Docker image and run a container. Ensure that Docker is installed on your machine before proceeding. Feel free to customize the Dockerfile and project structure based on your specific application requirements.\n\n## Dockerfile Overview\n### Base Image\n\nThe Dockerfile starts with the official Node.js 19 Alpine image, which provides a lightweight Linux environment with Node.js and npm installed.\n\n```dockerfile\n# Base image\nFROM node:19-alpine\n```\n\n### Copying Application Files\n\nThe next steps involve copying the necessary files from your local machine to the container. This includes the `package.json` file and the `src`` directory.\n\n```Dockerfile\n# Copy package.json to /app/ in the container\nCOPY package.json /app/\n\n# Copy the entire src directory to /app/ in the container\nCOPY src /app/\n```\n### Working Directory\n\nSet the working directory to /app/ in the container to execute commands and run the application.\n\n```Dockerfile\n# Change into the /app/ directory\nWORKDIR /app\n```\n\n### Installing Dependencies\n\nRun `npm install` to install the dependencies specified in the `package.json`` file.\n\n```Dockerfile\n# Install dependencies\nRUN npm install\n```\n\n### Starting the Application\n\nThe final command in the Dockerfile specifies the default command to be executed when the container starts. In this case, it starts the Node.js application using node server.js.\n\n```Dockerfile\n# Start the Node.js application\nCMD [\"node\", \"server.js\"]\n``````\n\n### Building and Running the Docker Image\n\nTo build the Docker image, use the following command:\n\n```bash\ndocker build -t node-app:1.0\n```\n\nTo run a container from the built image:\n\n```bash\ndocker run -p 3000:3000 node-app:1.0 .\n```\n\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvolodarskyi%2Fdockerize-node-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvolodarskyi%2Fdockerize-node-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvolodarskyi%2Fdockerize-node-js/lists"}