All Projects → play-with-docker → Play With Docker

play-with-docker / Play With Docker

Licence: mit
You know it, you use it, now it's time to improve it. PWD!.

Programming Languages

javascript
184084 projects - #8 most used programming language
go
31211 projects - #10 most used programming language
HTML
75241 projects
shell
77523 projects
CSS
56736 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to Play With Docker

Mln
高性能、小巧、易上手的移动跨平台开发框架. A framework for building Mobile cross-platform apps with Lua
Stars: ✭ 1,343 (-36.14%)
Mutual labels:  playground
Vuep.run
🏃 An online playground for Vue2.0
Stars: ✭ 125 (-94.06%)
Mutual labels:  playground
Swift Summary
A summary of Apple's Swift language written on Playgrounds
Stars: ✭ 1,668 (-20.68%)
Mutual labels:  playground
Spring Kotlin Exposed
playground for spring-boot 2.*, kotlin , jetbrains-exposed, postgres, jsonb, flyway, docker
Stars: ✭ 106 (-94.96%)
Mutual labels:  playground
Demosify
Create a playground to show the demos of your projects.
Stars: ✭ 121 (-94.25%)
Mutual labels:  playground
What The Filter
A visual playground to JavaScript array & object transformations.
Stars: ✭ 128 (-93.91%)
Mutual labels:  playground
Codemagic
Codemagic.gr is a powerful online code editor for web development
Stars: ✭ 94 (-95.53%)
Mutual labels:  playground
Widgetsplayground
前端组件管理系统
Stars: ✭ 150 (-92.87%)
Mutual labels:  playground
Whats New In Swift 5 1
An Xcode playground that demonstrates the new features introduced in Swift 5.1.
Stars: ✭ 122 (-94.2%)
Mutual labels:  playground
Ood Principles In Swift
💎 The Principles of OOD (SOLID) based on Uncle Bob articles.
Stars: ✭ 1,710 (-18.69%)
Mutual labels:  playground
Labs
This is a collection of tutorials for learning how to use Docker with various tools. Contributions welcome.
Stars: ✭ 10,443 (+396.58%)
Mutual labels:  swarm-mode
Ios Design Patterns
Learning ground for iOS Design Pattern included with sample projects for MVC, MVP, MVVM, and VIPER
Stars: ✭ 120 (-94.29%)
Mutual labels:  playground
Rd3
Playground for React & D3.js
Stars: ✭ 128 (-93.91%)
Mutual labels:  playground
Godoc Playground
Play with GoDoc syntax and preview your changes in realtime
Stars: ✭ 104 (-95.05%)
Mutual labels:  playground
Layer5
Layer5, the service mesh company, representing every service mesh
Stars: ✭ 137 (-93.49%)
Mutual labels:  playground
Dataformsjs
🌟 DataFormsJS 🌟 A minimal JavaScript Framework and standalone React and Web Components for rapid development of high quality websites and single page applications.
Stars: ✭ 95 (-95.48%)
Mutual labels:  playground
Pulsesensorplayground
A PulseSensor library (for Arduino) that collects our most popular projects in one place.
Stars: ✭ 126 (-94.01%)
Mutual labels:  playground
Whats New In Swift 4
An Xcode playground showcasing the new features in Swift 4.0.
Stars: ✭ 1,860 (-11.55%)
Mutual labels:  playground
Coredataplaygrounds
Exploring Core Data through Swift playgrounds
Stars: ✭ 139 (-93.39%)
Mutual labels:  playground
Testdrive
Quickly try out any Swift pod or framework in a playground
Stars: ✭ 1,612 (-23.35%)
Mutual labels:  playground

play-with-docker

Play With Docker gives you the experience of having a free Alpine Linux Virtual Machine in the cloud where you can build and run Docker containers and even create clusters with Docker features like Swarm Mode.

Under the hood DIND or Docker-in-Docker is used to give the effect of multiple VMs/PCs.

A live version is available at: http://play-with-docker.com/

Requirements

Development

# Clone this repo locally
git clone https://github.com/play-with-docker/play-with-docker
cd play-with-docker

# Verify the Docker daemon is running
docker run hello-world

# Load the IPVS kernel module. Because swarms are created in dind,
# the daemon won't load it automatically
sudo modprobe xt_ipvs

# Ensure Docker daemon is running in swarm mode
docker swarm init

# Get the latest franela/dind image
docker pull franela/dind

# Optional (with go1.14): pre-fetch module requirements into vendor
# so that no network requests are required within the containers.
# The module cache is retained in the pwd and l2 containers so the
# download is a one-off if you omit this step.
go mod vendor

# Start PWD as a container
docker-compose up

Now navigate to http://localhost and click the green "Start" button to create a new session, followed by "ADD NEW INSTANCE" to launch a new terminal instance.

Notes:

  • There is a hard-coded limit to 5 Docker playgrounds per session. After 4 hours sessions are deleted.
  • If you want to override the DIND version or image then set the environmental variable i.e. DIND_IMAGE=franela/docker<version>-rc:dind. Take into account that you can't use standard dind images, only franela ones work.

Port forwarding

In order for port forwarding to work correctly in development you need to make *.localhost to resolve to 127.0.0.1. That way when you try to access to pwd10-0-0-1-8080.host1.localhost, then you're forwarded correctly to your local PWD server.

You can achieve this by setting up a dnsmasq server (you can run it in a docker container also) and adding the following configuration:

address=/localhost/127.0.0.1

Don't forget to change your computer default DNS to use the dnsmasq server to resolve.

FAQ

How can I connect to a published port from the outside world?

If you need to access your services from outside, use the following URL pattern http://ip<hyphen-ip>-<session_jd>-<port>.direct.labs.play-with-docker.com (i.e: http://ip-2-135-3-b8ir6vbg5vr00095iil0-8080.direct.labs.play-with-docker.com).

Why is PWD running in ports 80 and 443?, Can I change that?.

No, it needs to run on those ports for DNS resolve to work. Ideas or suggestions about how to improve this are welcome

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].