{"id":26869613,"url":"https://github.com/stuartdaniells/basic_server_docker_container","last_synced_at":"2025-10-08T12:55:34.635Z","repository":{"id":210160489,"uuid":"582460660","full_name":"StuartDaniells/basic_server_docker_container","owner":"StuartDaniells","description":"Docker container to create a simple/dummy express server listening on port 3000","archived":false,"fork":false,"pushed_at":"2022-12-26T23:12:39.000Z","size":645,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-10T02:34:01.432Z","etag":null,"topics":["docker","dockerfile","dockerimage","expresss","nodejs"],"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/StuartDaniells.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}},"created_at":"2022-12-26T22:56:41.000Z","updated_at":"2022-12-26T23:14:42.000Z","dependencies_parsed_at":"2023-12-01T05:27:18.089Z","dependency_job_id":"1da55ae4-dd26-49a4-a5ca-51635688e6e9","html_url":"https://github.com/StuartDaniells/basic_server_docker_container","commit_stats":null,"previous_names":["stuartdaniells/basic_server_docker_container"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/StuartDaniells/basic_server_docker_container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StuartDaniells%2Fbasic_server_docker_container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StuartDaniells%2Fbasic_server_docker_container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StuartDaniells%2Fbasic_server_docker_container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StuartDaniells%2Fbasic_server_docker_container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StuartDaniells","download_url":"https://codeload.github.com/StuartDaniells/basic_server_docker_container/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StuartDaniells%2Fbasic_server_docker_container/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278948022,"owners_count":26073748,"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-10-08T02:00:06.501Z","response_time":56,"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","dockerfile","dockerimage","expresss","nodejs"],"created_at":"2025-03-31T06:17:55.323Z","updated_at":"2025-10-08T12:55:34.619Z","avatar_url":"https://github.com/StuartDaniells.png","language":"Dockerfile","readme":"## 1. To create an image of the curr. dir.\n`docker build .`\n\n---\n\n## 2. Docker image id:\n`cafc1e2ef3e59dc1169b917dbae80453fa5000bd3222f504aefea593a62c28b7`\n\n---\n\n\n## 3. To create a container based on this image, run: (read next point)\n`docker run cafc1e2ef3e59dc1169b917dbae80453fa5000bd3222f504aefea593a62c28b7`\n\n---\n\n## 4. However since we want to expose/publish a port, to connect to on this container we are running, we instead run:\n`docker run -p 3000:3000 cafc1e2ef3e59dc1169b917dbae80453fa5000bd3222f504aefea593a62c28b7`\n\n**The above cmd exposes port 3000 on the current localhost machines port 3000**\n\n\n\u003cmark\u003eSince there is no connection between the container and local OS, we do the below, to send http requests \u0026 responses to the app in this container\u003c/mark\u003e\n+ *-p 3000: publishes/listen in containers port 3000 only*\n+ *-p 3000:3000 opens up the containers port 3000 to the local machines port 3000*\n\n---\n\n## 5. To list all running container:\n`docker ps`\n\n---\n\n## 6. To stop a running container:\n`docker stop 'NAME'`\n\n---\n\n\u003e Note:\n\u003e 1) .cjs - uses Nodejs old default module system - CommonJs - require\n\u003e 2) .mjs - uses Nodejs native module system - ECMAScript - import \u0026 export","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuartdaniells%2Fbasic_server_docker_container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstuartdaniells%2Fbasic_server_docker_container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuartdaniells%2Fbasic_server_docker_container/lists"}