Play with Docker in the browser

Want to experiment with this thing called Docker but don’t want to go through the hassle of installing it? Go to http://play-with-docker.com/ and you are good to go.

In this website you can spin up 5 instances of Linux running for 4 hours. Lets make a webserver running there and see how it all works.

First press ‘Add new Instance’ and a new machine start up.

image

The machine is running on ip number 10.0.240.3. We need this number later on Star.

Now start a Nginx webserver on port 80:

$ docker run –name docker-nginx -p 80:80 -d nginx

image

We need one more thing, we want to test the webserver on some public address. With some Ngrok magic this is possible, but be sure to replace the ip address with your ip address Star.

$ docker run –net host -ti jpetazzo/ngrok http 10.0.240.3:80

image

A new server is started on http://18d73db6.ngrok.io, we can use this address in a browser to test it all.

image

And it all works Smile

More advanced Docker topics are now also possible, like running multiple containers with docker-compose or a cluster with Docker Swarm.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s