Why and why not use Docker | Advantages Disadvantages | Interview Question and Answer | Code Decode

preview_player
Показать описание
in this video of code decode we have explained advantages and disadvantages of using docker in your project.

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

Hibernate Interview Questions and Answers:

Spring Boot Interview Questions and Answers:

Subscriber and Follow Code Decode

#docker #dockerinterviewquestions #codedecode
Рекомендации по теме
Комментарии
Автор

You are too good. You just impart all the important technical knowledge in such simplicity. Would request you to put more videos on this.

bhavyasingh
Автор

You explained really well ma'am, great video. Can we run both WIndows and Linux server in AWS as well at the same time?

aakashsonkusare
Автор

Eager to have more videos on this. Please upload further videos soon. Thanks, your video are awesome as always!

AshishSingh-rxsq
Автор

Thank you for great video, please continue the series am waiting for it.

sunithan
Автор

Code decode.... I needed it! Thanks you read my mind..

sproutboot
Автор

please continue the series.. very useful content

sapdev
Автор

hi can you please explain me about the hazelcast caching

gurukeerthana
Автор

can you please make a video explaining where the web application is deployed ? Is it in tomcat, linux, aws, docker or mix of all .I am confused .

diljeet
Автор

Great Explanations...
Please cover Kubernetes n Jenkins...

ganpatinatrajan
Автор

Hi Code decode,
I have been following your tutorials last month.
It's really impressive. for this lecture continuation I am looking for it which is moving the springboot application creating a docker image.

prudhvinadh
Автор

Please add a seperate playlist/add the docker series videos to some playlist, easier to find and watch during interview prep.

sayanbiswas
Автор

Can you please upload full stack java developer interview questions

lijageorge
welcome to shbcf.ru