Docker is the most popular container technology tool use in the industry. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. Because of this developers can rest assure that the developed application work on any other Linux machine and renegades of any customization made.
Docker allows applications to use the same Linux kernel as the system that they’re running on and only requires applications be shipped with things not already running on the host computer. This gives a significant performance boost and reduces the size of the application.
Lets see how its done
Create a Docker container (Creating Ubuntu container)
<br /> docker run -it ubuntu /bin/bash<br />
-i = Interactive Mode
-t = Use tls
Update the Container OS and Install Ruby
<br /> #Install OS updates<br /> apt-get update </p> <p>#Install Ruby<br /> apt-get install -y ruby2.0-dev<br />
Commit the changes to container and create a Image of the container
<br /> #Get the Containers<br /> docker ps -a</p> <p>#Commit the Changes and create a Image<br /> docker commit -m "install ruby" -a "kasun" 583cc7b4df02 kasun\rubyinstall<br />
Now you can use newly created image to create another container