Differences between a docker image and a container? Docker Container Docker Image Docker Containers are actually Docker Virtual Machines. Essentially, a Docker image is a map of the house, while a Docker container is the actual house itself, so we can call it an instance of an image. Images are templates containing instructions for creating containers. With Docker images, containers can be created to run on the Docker platform.
It is a real-world entity. It is a logical entity.
Using images, containers can be created as many times as necessary. An image is only created once.
In order for containers to change, the old image must be deleted and a new one must be used to build the containers. There is no change to the image. It is immutable.
A container requires computing resources to run since it runs as a Docker Virtual Machine. Computing resources aren't required to work with images.
Run the "docker build." command to build a container from an image. Creating a Docker image requires writing a script in a Dockerfile.
In order to function, containers utilize server information and file systems provided by docker images. You can use Docker images to package up applications and pre-configured server environments.
What is CI/CD pipeline? CI/CD is a combination of continuous integration (CI) and continuous delivery (usually) or continuous deployment (rarely) in software engineering.
As part of the pipeline, code is built, tests are run (CI), and a new version of the application is safely deployed (CD).
Explain Docker. As its name implies, Docker is a containerization platform that packages applications and their dependencies together in containers to ensure that the applications run seamlessly across multiple environments. Docker containers are entire file systems that contain all the components for running a piece of software: code, system tools, runtime, system libraries, etc. Any software that can be installed on a server can be packaged in a Docker container. It ensures that the software always runs the same in any environment.
What does containerization mean? As the term implies, containerization entails packaging together software code along with all the necessary components, such as frameworks, libraries, and other dependencies, in their own container. Among the advantages of containerization is that a container can be viewed as a fully packaged computing environment that can be transported in one piece.
Describe the build stage. The build stage is the first phase of the CI/CD pipeline, and it automates a lot of the steps that a typical developer goes through, such as installing tools, downloading dependencies, and compiling a project. Aside from building code, build automation involves the use of tools to verify that the code is safe and compliant with best practices. In this stage, the buildability and testability of the application are validated.
Explain Git. It is a distributed version control system that keeps track of changes to code repositories. As projects progress, Git uses a branch-based workflow to streamline team collaboration.
Some popular CI/CD tools are as follows:
Jenkins CircleCI Bamboo Team City Codefresh
For Experienced
What do you mean by Rolling Strategy? Rolling deployments update running instances of an application with new releases as they are released. The process involves replacing old versions of an application over time with new versions of the application by replacing the entire infrastructure on which the application is run.
Explain OpenShift Container Platform. OpenShift Container Platform is a PAAS service offered by RedHat, formerly called OpenShift Enterprises. Additionally, Open Shift offers auto-scaling, self-healing, and highly available applications without the need to manually set them up in a traditional environment, even if they're on-premises or in the cloud.
Can you tell me about the serverless model? There is a cloud-native approach to development known as serverless development, which allows developers to develop and run applications without requiring the management of servers. The server still exists serverless, but it is abstracted from application development.
What are some of the deployment strategies? Regular release/deployment: Through a single release, the software is made available to the public. Canary releases: These releases are intended to reduce the risk of failure by exposing a small fraction of the user base (around 1%) to the release. As part of a canary release, developers gradually transition users to the new release in a controlled manner. Blue-green releases: Essentially, it involves running two instances of an application simultaneously; one is the current stable version, and the other is the most recent version. An immediate switch is made from the old version to the new one. If there is a problem, users can immediately revert to the previous version, which is safer than regular or big-bang releases.
What is TDD? Test-Driven Development (TDD) is a software design practice in which a developer writes tests before code. By inverting the usual order in which software is written, a developer can think of a problem in terms of inputs and outputs and write more testable (and thus more modular) code.
The TDD cycle consists of three steps:
Red: write a test that fails. Green: write the minimal code that passes the test. Refactor: improve the code, and make it more abstract, readable, and optimized.
What is the main difference between BDD and TDD? If TDD is about designing a thing right, Behavior-Driven Development (BDD) is about designing the right thing. Like TDD, BDD starts with a test, but the key difference is that tests in BDD are scenarios describing how a system responds to user interaction.
While writing a BDD test, developers and testers are not interested in the technical details (how a feature works), rather in behavior (what the feature does). BDD tests are used to test and discover the features that bring the most value to users.
Java Build Tools
Gradle
Apache Maven
CMake
Jenkins
Benefits of Using Build Tools
Reduces manual work and gets results faster Unify disconnected builds Use familiar language Incremental builds Provide control for operations