Posts

Showing posts from July, 2024

Docker Volumes

Image
When do we need Docker volumes ? What is Docker Volume ? 3 Volume types Docker Volumes in Docker compose file ============ Volumes : On the host there will be a Physical File system path and we plug into the docker container. So what happens is when the container writes it to its file system it get replicated to the physical file system. If i change somerthing on the physical file system gets replicated the containers as well - it works Vice-Versa First type: Host Volume:  This type will give you the right to decide which volume on the host file must be used. docker run -v /home/mount/data:/va/lib/mysql/data /home/mount/data  -- Host directory /va/lib/mysql/data -- Container file system --- Second type  - Anonymous volumes  just by specifying the container filesystem which host file should be mounted is taken care by docker itself so that directory is automatically created by docker  docker run -v  :/va/lib/mysql/data here you are only referencing the conta...

Docker Interview -1

 Difference between docker toolbox and docker desktop   Docker Toolbox and Docker Desktop are both tools used to run Docker on your local machine, but they have some key differences. Docker Toolbox Docker Toolbox is the older version of Docker’s local development environment, and it was designed primarily for systems that did not support Docker Desktop (for example, Windows 7 or older versions). Here’s a quick overview of Docker Toolbox: Components : Docker Engine : The core of Docker, which runs containers. Docker Machine : A tool that helps you create virtual machines on your local system to run Docker containers (for systems that don’t have native support for Docker). Docker Compose : A tool that allows you to define and run multi-container Docker applications. Kitematic : A GUI to interact with Docker containers (though it’s no longer actively maintained). Platform Support : Primarily for Windows and macOS versions prior to Windows 10/11 or macOS High Si...