Last week I found an amazing valuable in-browser Docker solution hacked by Marcos Nils and Jonathan Leibiusky and sponsored by Docker Inc.  

About PWD

PWD is a Docker playground that allows launching and using Docker Containers in your browser within seconds. You don’t need to install anything!!!
Just visit https://labs.play-with-docker.com, log in with you Docker Hub user and play around with a free Alpine Linux Docker Container in your browser.

Of course, the base Alpine Linux container supports Docker-in-Docker (DinD), so it’s up to you to launch any containers of your choice and even create clusters in Docker Swarm Mode.

How does it look like?

Play with Docker provides a simple but effective web-user-interface. Each session is limited to four hours, but in fact, this is always enough for demos, testing, and training purpose.


Top features

In the following part, I shortly describe my personal top core features of Play with Docker.

Showcasing your application
(One-click on-demand demo instance of our application)

You published a project and would like to provide an on-demand testing instance?
Using PWD you can provide a showcasing instance with a single click.

Try hello-world in PWD

Basically you need to provide two things:

  1. Your application as a ready to use Docker Compose raw file.
    Example: https://gitlab.com/fabian.guschlbauer/play-with-docker/-/raw/master/docker-compose.yml
  2. The base PWD-URL extended with your Docker official image or Docker Compose file.
    https://labs.play-with-docker.com/?stack=[insert-your-docker-image]
    Note: Since PWD uses Docker stack deploy to provide the container, you are not able to build new images. Check documentation for configuration keys available using Docker stack deploy.
    Example: https://labs.play-with-docker.com?stack=https://gitlab.com/fabian.guschlbauer/play-with-docker/-/raw/master/docker-compose.yml

Ports can also be exposed as shown in the Nginx-example.

Try nginx in PWD

PWD automatically exposes ports defined in the Docker Compose file and provides a link next to “OPEN PORT”.

Hint: In case you would like to include your application showcasing URL as a button like above on your website or Github Readme, just add the following snippet.

<a href="https://labs.play-with-docker.com?stack=https://gitlab.com/fabian.guschlbauer/play-with-docker/-/raw/master/docker-compose.yml"><img src="https://cdn.rawgit.com/play-with-docker/stacks/cff22438/assets/images/button.png" alt="Try in PWD"></a>

Drag&Drop

Uploading files into a PWD instance is a simple but powerful feature, especially because there is nearly no use-case were you do not need any script, dockerfile, or something like this inside your container.

PWD Docker Machine Driver and SSH

Are you looking forward to your next fancy live demo, interactive presentation session, or workshop and want to use your favorite terminal?
PWD Machine Driver allows you to create and manage your PWD instances easily through your favorite terminal.
To install PWD Machine Driver follow the instructions from the project’s readme.

Use the PWD Machine Driver:

  1. Get the session URL of PWD from your browser and export it into the PWD_URL environment variable.
    export PWD_URL=”https://labs.play-with-docker.com/p/bqjjtn2osm4g008jj9r0#bqjjtn2o_bqjjtqqosm4g008jj9s0"
    Instead of specifying the PWD_URL environment variable, you could use the --pwd-url option of the PWD Machine Driver.
  2. Create a new instance “node2” using
    docker-machine create -d pwd node2
  3. SSH connect using docker-machine ssh node2


Categories: Engineering