Introduction Flashcards
In what environments Docker containers can run?
on all major Linux distributions, Microsoft Windows, and on any infrastructure including VMs, bare-metal and in the cloud.
Where does the application data live on Docker?
Application data does not live in the container. It lives in a Docker volume that is shared between 1-N containers as defined by the application architecture. Sysadmins back up the data volume and forget about the container. Optimally docker containers are completely stateless and immutable.
How can the Docker be patched?
Admins update their existing Docker image, stop their running containers, and start up new ones. Because a container can be spun up in a fraction off a second, these updates are done in exponentially more quickly than they are with virtual machines.
Whats the situation for application servers inside Docker?
Application servers translates into a service run inside of a Docker
container.
Can container-based services interact with VM-based services?
Yes. Running your application in a set of Docker containers doesn’t preclude it from talking to the services running in a VM.
For instance, your application may need to interact with a database that resides in a virtual machine. Provided that the right networking is in place, your application can interact with that database seamlessly.
What are the use cases for Docker?
- Containerize traditional apps (benefit is container isolation, portability, reduced costs)
- Continuous Integration and Deployment (CI / CD)(benefits are streamlining CI testing time, scaling CI testing infrastructure, integration - APIs, open interfaces and webhooks allow for easy integration into existing tools and processes to further automate the app pipeline- and automation by saving time and improve software quality by instantly spawning Docker hosts and containers to run more tests in parallel.)
- Microservices (benefits are developers are free to use right tools and stacks without creating app conflicts, accelerate the rate of innovation of new software features, gain consistency in the app env.)
- IT infrastructure optimization (benefits are Containerize apps and consolidate the VMs and servers to reduce the infrastructure footprint, Reduce operational overhead of patching and maintaining additional operating systems, virtual and physical servers, Improve resource utilization, app scalability, disaster recovery and availability.)
What is an Image?
An image is a lightweight, stand-alone, executable package that includes everything needed to run a piece of software, including the code, a runtime, libraries, environment variables, and config files.
What is a container?
A container is a runtime instance of an image – what the image becomes in memory when actually executed. It runs completely isolated from the host environment by default, only accessing host files and ports if configured to do so.
Explain why containers have better performance characteristics than VMs?
Containers run apps natively on the host machine’s kernel. They have better performance characteristics than virtual machines that only get virtual access to host resources through a hypervisor. Containers can get native access, each one running in a discrete process, taking no more memory than any other executable.
How containers are run basically?
Containers can share a single kernel, and the only information that needs to be in a container image is the executable and its package dependencies, which never need to be installed on the host system. These processes run like native processes, and you can manage them individually by running commands like docker ps – just like you would run ps on Linux to see active processes. Finally, because they contain all their dependencies, there is no configuration entanglement; a containerized app “runs anywhere.”
What is Dockerfile?
Dockerfile will define what goes on in the environment inside your container. Access to resources like networking interfaces and disk drives is virtualized inside this environment, which is isolated from the rest of your system, so you have to map ports to the outside world, and be specific about what files you want to “copy in” to that environment. However, after doing that, you can expect that the build of your app defined in this Dockerfile will behave exactly the same wherever it runs.
How is the hierarchy in distributed applications?
Stack(defining the interactions of all the services)
Services(defines how containers behave in production)
Container(bottom)