{"id":13841613,"url":"https://github.com/bingohuang/docker-labs","last_synced_at":"2025-05-15T14:33:10.295Z","repository":{"id":62483217,"uuid":"91067285","full_name":"bingohuang/docker-labs","owner":"bingohuang","description":"Docker在线实验室","archived":false,"fork":false,"pushed_at":"2017-07-28T07:17:02.000Z","size":446,"stargazers_count":226,"open_issues_count":4,"forks_count":55,"subscribers_count":6,"default_branch":"bingohuang","last_synced_at":"2025-04-03T10:51:19.732Z","etag":null,"topics":["docker","docker-lab","golang"],"latest_commit_sha":null,"homepage":"http://labs.bingohuang.com","language":"JavaScript","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/bingohuang.png","metadata":{"files":{"readme":"README-en.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}},"created_at":"2017-05-12T08:07:28.000Z","updated_at":"2025-03-23T15:14:04.000Z","dependencies_parsed_at":"2022-11-02T08:45:44.888Z","dependency_job_id":null,"html_url":"https://github.com/bingohuang/docker-labs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingohuang%2Fdocker-labs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingohuang%2Fdocker-labs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingohuang%2Fdocker-labs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingohuang%2Fdocker-labs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bingohuang","download_url":"https://codeload.github.com/bingohuang/docker-labs/tar.gz/refs/heads/bingohuang","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254359087,"owners_count":22058041,"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","docker-lab","golang"],"created_at":"2024-08-04T17:01:16.932Z","updated_at":"2025-05-15T14:33:09.865Z","avatar_url":"https://github.com/bingohuang.png","language":"JavaScript","funding_links":[],"categories":["JavaScript (485)","JavaScript"],"sub_categories":[],"readme":"# play-with-docker\n\nPlay With Docker gives you the experience of having a free Alpine Linux Virtual Machine in the cloud\nwhere you can build and run Docker containers and even create clusters with Docker features like Swarm Mode.\n\nUnder the hood DIND or Docker-in-Docker is used to give the effect of multiple VMs/PCs.\n\nA live version is available at: http://play-with-docker.com/\n\n## Requirements\n\nDocker 1.13+ is required. \n\nThe docker daemon needs to run in swarm mode because PWD uses overlay attachable networks. For that\njust run  `docker swarm init` in the destination daemon.\n\nIt's also necessary to manually load the IPVS kernel module because as swarms are created in `dind`, \nthe daemon won't load it automatically. Run the following command for that purpose: `sudo modprobe xt_ipvs`\n\n\n## Development\n\nStart the Docker daemon on your machine and run `docker pull franela/dind`. \n\n1) Install go 1.7.1 with `brew` on Mac or through a package manager.\n\n2) `go get -v -d -t ./...`\n\n3) Start PWD as a container with docker-compose up.\n\n5) Point to http://localhost and click \"New Instance\"\n\nNotes:\n\n* There is a hard-coded limit to 5 Docker playgrounds per session. After 4 hours sessions are deleted.\n* If you want to override the DIND version or image then set the environmental variable i.e.\n  `DIND_IMAGE=franela/docker\u003cversion\u003e-rc:dind`. Take into account that you can't use standard `dind` images, only [franela](https://hub.docker.com/r/franela/) ones work.\n\n\n## FAQ\n\n### How can I connect to a published port from the outside world?\n\n~~We're planning to setup a reverse proxy that handles redirection automatically, in the meantime you can use [ngrok](https://ngrok.com) within PWD running `docker run --name supergrok -d jpetazzo/supergrok` then `docker logs --follow supergrok` , it will give you a ngrok URL, now you can go to that URL and add the IP+port that you want to connect to… e.g. if your PWD instance is 10.0.42.3, you can go to http://xxxxxx.ngrok.io/10.0.42.3:8000 (where the xxxxxx is given to you in the supergrok logs).~~\n\nIf you need to access your services from outside, use the following URL pattern `http://pwd\u003cunderscore_ip\u003e-\u003cport\u003e.\u003chost#\u003e.labs.play-with-docker.com` (i.e: http://pwd10_2_135_3-80.host3.labs.play-with-docker.com/).\n\n### Why is PWD running in ports 80 and 443?, Can I change that?.\n\nNo, it needs to run on those ports for DNS resolve to work. Ideas or suggestions about how to improve this\nare welcome\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbingohuang%2Fdocker-labs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbingohuang%2Fdocker-labs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbingohuang%2Fdocker-labs/lists"}