Play with Docker

Docker launched a very cool sandbox, play-with-docker.com , so anyone can try out Docker standalone and Docker Swarm(will do another post later to show this). I've personally tried it and it's fully functional!

I uploaded a sample Spring Boot Docker image in docker hub so I can try it in the sandbox.

Here is the source to create the Docker image
https://github.com/donvito/mv-spring-boot-docker

You can pull the image using this command
docker pull melvindave/spring-boot-example
alt

alt

To run use this command
docker run -d -p 8081:8080 melvindave/spring-boot-example
alt

To check logs you can run this command
docker logs <container id>
alt

To see if the Spring Boot application is running, click the link 8081(port which we exposed to the outside world using the option -p 8081:8080)

It will open a new browser window and you can see the response of the Spring Boot application.
alt

If you want to run play-with-docker locally in your Mac, check out my blog post about this.

Happy hacking! Please feel free to leave comments below. Cheers! :)