Posts

Docker-Compose

Image
Need of docker-compose The big purpose of Docker compose is not only to automate some of these long winded commands it's also to make sure that we have the ability to easily start up multiple docker containers at the same time and connect them together in some automated fashion. Now to make use of Docker compose we're essentially going to take the same commands that we are running before like dock or build in dock or run but we're going to kind of encode these commands into a very special file in our project directory called docker-compose.yml Sample Diagram of docker-compose file docker-compose example  In above examample version is the version of docker-compose we are using services  - services are different docker container we are going to use , here we are using 2 containers                  one is redis and second is node-app container whose docker file we have written . since we       ...

Custom Images

Image
Steps  to create a docker Image  STEP 1 creation of docker file Example   Create a image that  runs  redis-server docker file RUN command  ->     docker build .  what does these 3 steps do ( FROM , RUN , CMD) 1. FROM     The from Alpine We said that we wanted to use the Alpine docker image as kind of    an initial operating system or a starting point for the image that we are creating. 2. RUN     with this command we are installing dependencies which are required for  our docker 3. CMD    in this section we define the start command when our docker container start running . DETAILED FLOW   

Container

Image
To understand the container you first need to have a little bit of background on exactly how your operating system runs on your computer.So going to first give you a quick overview of your operating system.So this is a quick overview of the operating system on your computer. Most operating systems have something called a kernel.The kernel is a running software process that governs access between all the programs that are running on your computer and all the physical hardware that is connected to your computer as well.So if you're at the top of this diagram we have different programs that your computer's running such as chrome or terminal. lest see this example. If you've ever made use of Nodejs as before and you've written a file to the hard drive it's technically Nodejs that is speaking directly to the physical device instead.Nodejs says to your kernel hey I want to write a file to the hard drive.The kernel then takes that information and eventually ...

docker what and why

Image
What is Docker? Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. 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. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code. In a way, Docker is a bit like a virtual machine. But unlike a virtual machine, rather than creating a whole virtual operating system, 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 Image and container Ima...