
At the end of last year, two
Docker captains presented their development called Play with Docker (PWD) - “Playground for Docker”. Users are invited to work free with the assembly and launch of Docker containers directly in a web browser, and also to perform laboratory work to get to know Docker from scratch and improve their skills.
Playground
The main site of the service is
play-with-docker.com , which, after passing through CAPTCHA, sends it to one of the cloud hosts, where the 4-hour session of the “playground” (playground) starts. In it, you can create new entities (instances), i.e. nodes of the test Docker cluster. Each of them is an installation of the lightweight Alpine Linux distribution (currently 3.6.2 with Linux 4.4.0 kernel) with an editable local IP address. They have Docker installed the current version of
17.06 Community Edition .
')
All work happens right in the web browser:

The terminal emulation uses a JavaScript implementation of
xterm.js from SourceLair, which supports many modern browsers (Chrome 48+, Edge 13+, Firefox 44+, Internet Explorer 11+, Opera 35+, Safari 8+). The terminal is very convenient in operation, supports standard keyboard shortcuts, autocompletion of <TAB> - including for the commands / arguments of the
docker
console
docker
.
The number of created entities is limited to five. In addition to the standard image of a system with a stable Docker, you can choose a dev-option (now it is based on Docker 17.07.0 CE RC1), and a special image with a solution for managing UCP (
Universal Control Plane ) clusters, which means having the appropriate images (
docker/ucp
,
docker/ucp-agent
,
docker/ucp-auth
,
docker/ucp-swarm
...) to run in containers:
[node4] (local) root@10.0.7.6 ~ $ docker run --privileged docker/ucp<TAB> docker/ucp docker/ucp-controller:2.1.5 docker/ucp-agent docker/ucp-dsinfo docker/ucp-agent:2.1.5 docker/ucp-dsinfo:2.1.5 docker/ucp-auth docker/ucp-etcd docker/ucp-auth-store docker/ucp-etcd:2.1.5 docker/ucp-auth-store:2.1.5 docker/ucp-hrm docker/ucp-auth:2.1.5 docker/ucp-hrm:2.1.5 docker/ucp-cfssl docker/ucp-metrics docker/ucp-cfssl:2.1.5 docker/ucp-metrics:2.1.5 docker/ucp-compose docker/ucp-swarm docker/ucp-compose:2.1.5 docker/ucp-swarm:2.1.5 docker/ucp-controller docker/ucp:2.1.5
Speaking of clusters: as part of your test installation on Play with Docker, you can make a cluster with Docker Swarm. The sequence of actions for this will look something like this:
More detailed step-by-step instructions on working with Docker Swarm within the framework of Play with Docker can be found in this video (in English).And to make it easier and better for novice Docker users to understand what you can do (and usefully) in the Docker playground, the authors of Play with Docker added to their service with a convenient learning resource.
PWD Training
Learning how to work with Docker is offered in the format of laboratory works that are published at
training.play-with-docker.com .
They are made as step-by-step instructions with explanations + terminal emulator, which is launched in the Play with Docker service, where you can execute the proposed instructions (you do not even have to enter commands completely — just click on the listings from the description on the left, and they are copied / executed on the terminal on the right):

The laboratory home page Play with Docker offers two guides:
- Operation (Ops) - getting started with Docker for IT professionals and system administrators: a first acquaintance with Docker, its basic concepts and capabilities; more deep study of features of Docker (architecture, integration with the existing infrastructure); use in production;
- Development (Dev) - getting started with Docker for developers: basic Docker concepts and how to build / deploy simple applications in it; working with image registries and application in continuous integration; deployment in staging, Docker Swarm management, application security.
In total, there are more laboratory labs, and their full list with a breakdown by level of complexity is given on a
separate page .
Pwd as open source
A great fact about Play with Docker is the publication of its source code on
GitHub under a free MIT license and the openness of authors to modifications from the community. The description of the project repository says: “You know PWD, you use it - it's time to improve!”
It also means that you can run the local version of Play with Docker to conduct all the necessary experiments on your resources. Installation requires Docker 1.13+ and Go 1.7.1+. Technically, to start the service, the DIND (Docker-in-Docker) feature is used, which allows you to run Docker inside the Docker. To do this, the default is to use a ready-made image from the developers (
franela/dind
), but if you wish, you can modify it (use your base image).
Development
At the April DockerCon, during the Moby Cool Hack session, the authors of Play with Docker presented their offspring (
video available).
They also
talked about some new PWD features:
- Driver for Docker Machine that allows you to manage PWD-hosts through the terminal and connect to them via SSH.
- The function of downloading files from the local computer is simple drag-n-drop to the open PWD terminal in a web browser (intended for
Dockerfile
). - Templates for sessions, allowing you to deploy a 5-node swarm cluster in just a few seconds.
- An extension for Chrome “ Play with Docker ” that adds the “Try in PWD” button to launch popular DockerHub images in this online environment, as well as the ability to embed a similar button on your sites (for your images):

- New labs on the learning resource (including work with multi-stage builds that appeared in Docker 17.06 ).