in this video of code decode we have explained advantages and disadvantages of using docker in your project.
Docker Interview Questions and Answers part 1 : • Docker Interview Quest...
Did you use Docker in your Project? If yes why ?
Yeah we did. We had a common problem of Developers saying “BUT IT WORKS ON MY MACHINE”
There are some scenarios which motivated us to move to dockerized application
We sometimes faced issue that our same code base when deployed to test, dev , worked fine but breaks on prod or QA servers . We found that Even though code base is same but dependencies / their version were problematic hence if we are able to package everything in one big container and run application in that container with same configuration, dependence then things wont break abruptly. Hence we moved to Docker
Apart from that we achieved few more advantages like -
Docker is an open platform for developing, shipping, and running applications.
Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.
With Docker, you can manage your infrastructure in the same ways you manage your applications.
By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production.
Use cases involves -
Environment standardization
Faster configuration with consistency
Better disaster recovery - Disaster is unpredictable. However, you can back up a Docker image (also called “snapshot”) for the state of the container at that back-up moment, and retrieve it later when serious issues happen. For example, a hardware failure just happened and you need to switch your work to a new hardware. With Docker, you can easily replicate the file to the new hardware.
Sometimes we found a bug when deploying a new version of one particular software. We can revert to the last version with the previous Docker image easily. Without Docker, we have to set up the rollback step from runtime to runtime
Improvement in adoption of DevOps
Did you find any disadvantages of using Docker ?
Security - Containers are lightweight, but you pay for this with security. Since containers in most cases use a common operating system, there is a general risk that several containers will be compromised at once if a host system is attacked. This is less likely with VMs as each VM uses its own operating system.
Containers don't run at bare-metal speeds - Docker containers use the Host Kernal only hence it will use as much system resources as the host’s kernel scheduler will allow. Docker might even make it slower. if the kernel detects that the host machine’s memory is running too low to perform important system functions, it could start killing important processes (may be your docker process too)
Persistent data storage is complicated. By design, all of the data inside a container disappears forever when the container shuts down, unless you save it somewhere else first. There are ways to save data persistently in Docker, such as Docker Data Volumes, but this is arguably a challenge that still has yet to be addressed in a seamless way.
Not For Simpler Deployable applications - So, if you have a complicated and tedious deployment process, Docker will help you out a lot. If you have a simple app, it just adds unnecessary complexity.
Need to Use Different Operating Systems or Kernels- With virtual machines, the hypervisor can abstract an entire device. You can use Microsoft Azure to run both instances of Windows Server and Linux Server at the same time. Docker image, however, requires the same operating system it was created for.
If an app is developed on Windows, but the production runs on Linux, you will not be able to use Docker effectively
Most Asked Core Java Interview Questions and Answers: • Core Java frequently a...
Advance Java Interview Questions and Answers: • Advance Java Interview...
Java 8 Interview Questions and Answers: • Java 8 Interview Quest...
Hibernate Interview Questions and Answers:
• Hibernate Interview Qu...
Spring Boot Interview Questions and Answers:
• Advance Java Interview...
Angular Playlist: • Angular Course Introdu...
SQL Playlist: • SQL Interview Question...
GIT: • GIT
Subscriber and Follow Code Decode
Subscriber Code Decode: www.youtube.co...
LinkedIn : / codedecodeyoutube
Instagram: / codedecode25
#docker #dockerinterviewquestions #codedecode
26 авг 2024