{"id":18441604,"url":"https://github.com/stefanwalther/docker-test","last_synced_at":"2025-07-11T03:33:16.479Z","repository":{"id":25428998,"uuid":"103740942","full_name":"stefanwalther/docker-test","owner":"stefanwalther","description":"Sample docker image to test various scenarios with Docker.","archived":false,"fork":false,"pushed_at":"2025-05-19T17:25:55.000Z","size":154,"stargazers_count":2,"open_issues_count":37,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T05:44:46.618Z","etag":null,"topics":["docker-image"],"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/stefanwalther.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.yml","contributing":"docs/contributing.md","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-09-16T09:28:25.000Z","updated_at":"2024-10-28T12:29:22.000Z","dependencies_parsed_at":"2024-09-11T02:04:10.346Z","dependency_job_id":"6e984ce0-b43a-45af-8681-92903d90c91f","html_url":"https://github.com/stefanwalther/docker-test","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/stefanwalther/docker-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwalther%2Fdocker-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwalther%2Fdocker-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwalther%2Fdocker-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwalther%2Fdocker-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanwalther","download_url":"https://codeload.github.com/stefanwalther/docker-test/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwalther%2Fdocker-test/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264721528,"owners_count":23653949,"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","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-image"],"created_at":"2024-11-06T06:38:45.725Z","updated_at":"2025-07-11T03:33:16.444Z","avatar_url":"https://github.com/stefanwalther.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-test\n\n\u003e Sample docker image to test various scenarios with Docker.\n\n[![CircleCI](https://img.shields.io/circleci/project/github/stefanwalther/docker-test.svg)](https://circleci.com/gh/stefanwalther/docker-test/tree/master)\n[![XO code style](https://img.shields.io/badge/code_style-XO--space-5ed9c7.svg)](https://github.com/sindresorhus/eslint-config-xo-space)\n\n---\n\n## Motivation\n\nJust another \"Hello World\" docker image to be used in various experiments ...\n\nNote: This Docker image is definitely not designed to be used in a production environment as it could result into serious security issues. But it's nice to be added to your toolbox when playing with Docker/Docker Swarm/Kubernetes, etc.\n\n## Usage\n\n```sh\n$ docker pull stefanwalther/docker-test\n```\n\n```sh\n$ docker run -it -p 3000:3000 stefanwalther/docker-test\n```\n\n### With docker-compose\n\n```sh\nversion: '3.3`\nservices:\n  hello-world:\n    image: stefanwalther/docker-test\n    ports:\n      - 3000:3000\n    environment:\n      - PORT=3000\n        \n```\n\n## Configuration\n\n- `PORT` - Port of the web service, defaults to 3000.\n\n## Endpoints\n\n### `/`\nJust returns a \"Hello World\":\n\n```json\n{\n  \"text\": \"Hello World\"\n}\n```\n\n### `/health-check`\nReturns a typical health-check, useful to test health-checks in a microservice environment.\n\n```json\n{\n  \"ts\": \"2017-12-07T22:25:34.489Z\",\n  \"version\": \"0.3.1\",\n  \"name\": \"docker-test\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/stefanwalther/docker-test.git\"\n  }\n}\n```\n\n### `/cmd`\nExecute any command on the machine and get the result.\n\nParameters:\n- `def` - The command to execute.\n\nUsage:\n```sh\n# Process ls -la\n$ curl http://localhost:3000/cmd/?def=ls%20-la\n```\n\nExamples:\n  - `ls -la` - list the directory\n  - `curl -o -I -L -s -w \"%{http_code}\\n\" http://localhost:3000/health-check` - Get the Http status code of the health-check\n\n### `/cmd-cron`\nCreate a cron job, executing a command.\n\nParameters:\n\n- `def` - The command to execute.\n- `cron` - The cron definition (see [https://crontab-generator.org/](https://crontab-generator.org/))\n\nUsage:\n\n```sh\n# Process \"echo foo\" with the following cron def: \"* * * * *\" (every minute)\n$ curl http://localhost:3000/cmd-cron?def=echo%20foo\u0026cron=*%20*%20*%20*%20*\n```\n\n## Experiments\n\n### Multistage Builds\n\n**References:**\n- https://capgemini.github.io/development/multi-stage-builds-in-docker/\n- https://codefresh.io/blog/node_docker_multistage/\n- Using multi-stage builds to reduce Go images: https://blog.alexellis.io/mutli-stage-docker-builds/\n- https://github.com/yamalight/node-docker-pkg-demo\n\n## About\n\n### Author\n\n**Stefan Walther**\n\n* [stefanwalther.io](http://stefanwalther.io)\n* [qliksite.io](http://qliksite.io)\n* [qlikblog.at](http://qlikblog.at)\n* [github/stefanwalther](https://github.com/stefanwalther)\n* [twitter/waltherstefan](http://twitter.com/waltherstefan)\n* [LinkedIn](https://www.linkedin.com/in/stefanwalther/)\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/stefanwalther/docker-test/issues). The process for contributing is outlined below:\n\n1. Create a fork of the project\n2. Work on whatever bug or feature you wish\n3. Create a pull request (PR)\n\nI cannot guarantee that I will merge all PRs but I will evaluate them all.\n\n### License\nCopyright © 2020, [Stefan Walther](http://qliksite.io).\n \nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanwalther%2Fdocker-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanwalther%2Fdocker-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanwalther%2Fdocker-test/lists"}