{"id":20956798,"url":"https://github.com/markbrown4/my-docker-app","last_synced_at":"2026-04-24T17:04:58.414Z","repository":{"id":147916693,"uuid":"81676315","full_name":"markbrown4/my-docker-app","owner":"markbrown4","description":"Docker 101","archived":false,"fork":false,"pushed_at":"2017-02-11T19:26:02.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T06:50:03.055Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/markbrown4.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":"2017-02-11T19:23:25.000Z","updated_at":"2017-02-11T19:23:44.000Z","dependencies_parsed_at":"2023-05-27T22:30:31.340Z","dependency_job_id":null,"html_url":"https://github.com/markbrown4/my-docker-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/markbrown4/my-docker-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbrown4%2Fmy-docker-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbrown4%2Fmy-docker-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbrown4%2Fmy-docker-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbrown4%2Fmy-docker-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markbrown4","download_url":"https://codeload.github.com/markbrown4/my-docker-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbrown4%2Fmy-docker-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32232663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"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":[],"created_at":"2024-11-19T01:27:57.970Z","updated_at":"2026-04-24T17:04:58.397Z","avatar_url":"https://github.com/markbrown4.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker 101\n\n## Commands\n\n- `docker images` list images\n- `docker rmi IMAGE ID` remove image\n- `docker pull mhart/alpine-node` download an images\n- `docker run --rm nginx` run an image\n- `docker ps` list running images\n- `docker stop CONTAINER ID` - stop a running image\n\n## nodejs\n\nCreate a simple node server\n\n```js\n// nodejs/index.js\nvar http = require('http')\n\nvar server = http.createServer(function (req, res) {\n  res.writeHead(200, {'Content-Type': 'text/plain'})\n  res.end('Welcome to Node.js!\\n')\n})\n\nserver.listen(3000)\nconsole.log('Server running at http://127.0.0.1:3000/')\n```\n\nAdd a docker file for the node app\n\n```Dockerfile\n# nodejs/Dockerfile\nFROM mhart/alpine-node\nCOPY index.js .\nEXPOSE 3000\nCMD node index.js\n```\n\nBuild and run\n\n```bash\ndocker build -t foo/node .\ndocker run -d -p 3000:3000 --name node-app foo/node\n```\n\nThen you should be able to hit http://locahost:3000/\n\n## nginx\n\nAdd nginx config\n\n```Nginx\n# nginx/default.conf\nserver {\n  location / {\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    proxy_set_header X-Forwarded-Proto $scheme;\n    proxy_pass http://app:3000;\n  }\n}\n```\n\nAdd a docker file for nginx\n\n```Dockerfile\n# nginx/Dockerfile\nFROM nginx\nCOPY default.conf /etc/nginx/conf.d/\n```\n\nBuild and run\n\n```bash\ndocker build -t foo/nginx .\ndocker run -p 8000:80 --link node-app:app --name nginx-proxy foo/nginx\n```\n\nThen you should be able to hit nginx at http://locahost:8000/ which proxies through to Node.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkbrown4%2Fmy-docker-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkbrown4%2Fmy-docker-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkbrown4%2Fmy-docker-app/lists"}