Just Set it and Forget it. Deploy To Anyone or Anywhere With Docker.

Run this from your docker container shell not your regular os’s prompt.Exit your container and run the command docker ps -l to see the last container you ran the -l is for last you can also use the -a that we spoke about in the previous paragraph and just use the latest container id.The command to save this new container is “docker commit <container id>” in our example its “docker commit 7a967f3c64a9”this will give you a long sha256 string which is your new image which is really inconvenient so you can run docker tag <long ass string> tag-name so that you can later refer to it by its tag name..In our example it would look like this.Now we can use docker and run “docker run -ti ubuntu-node-image” and we have a permanent image that we can share with others that has Node installed on a super light Ubuntu install.You can repeat this process and include an app that you have developed or add other things to the environment like Ruby with just the gems that are needed for your app and distribute it to everyone on your team..The real power of Docker however comes from using Docker Hub and which is a centralized repository of your images on the internet it allows you to share your images or install images from other users.Using Docker hub is a whole other blog post so let me wrap up by showing you how to save the image, store it on DropBox, and then reinstall it on another computer.Now that we have the image installed you can run the following to save your image and to import it from another other machine.Now you have a cloned environment on another system with exactly the things you need and none of the things you don’t..You can easily share this image with other people on your team or just start all your new apps from consistent starting point.To conclude, even on our machines when we start installing other packages and dependencies our system changes..Docker lets you always have a consistent environment to run and test your apps that you can also share with others..And that my friends is why Docker is the best thing since slice bread.Just like sliced bread created a new paradigm of sandwich making..Docker has created a new paradigm of virtualization.. More details

Leave a Reply