You can use json instead of yaml for your compose file, to use json file with compose,
specify the filename to use for eg: docker-compose -f docker-compose.json up
Q9. What is Dockerfile used for?
Docker can build images automatically by reading the instructions from a Dockerfile.
A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. Using docker build users can create an automated build that executes several command-line instructions in succession.
Q8. What is Docker Swarm?
It is native clustering for Docker which turns a pool of Docker hosts into a single, virtual Docker host. Docker Swarm serves the standard Docker API, any tool that already communicates with a Docker daemon can use Swarm to transparently scale to multiple hosts.
Some supported tools:
• Dokku
• Docker Compose
• Docker Machine
• Jenkins
Q7. How is Docker different from other container technologies?
Docker containers are easy to deploy in a cloud. It can get more applications running on
the same hardware than other technologies, it makes it easy for developers to quickly
create, ready-to-run containerized applications and it makes managing and deploying
applications much easier. You can even share containers with your applications.
If you have some more points to add you can do that but make sure the above the above
explanation is there in your answer.
Q6. What is Docker hub?
Docker hub is a cloud-based registry service which allows you to link to code repositories, build your images and test them, stores manually pushed images, and links to Docker cloud so you can deploy images to your hosts. It provides a centralized resource for container image discovery, distribution and change management, user and team collaboration, and workflow automation throughout the development pipeline.
Q5. What is Docker container? How it is created?
Docker containers include the application and all of its dependencies but share the kernel with other containers, running as isolated processes in user space on the host operating system. Docker containers are not tied to any specific infrastructure: they run on any
computer, on any infrastructure, and in any cloud.
Docker containers can be created by either creating a Docker image and then running it or you can use Docker images that are present on the Dockerhub.
Docker containers are basically runtime instances of Docker images.
Q4. What is Docker image?
Docker image is the source of Docker container. In other words, Docker images are used
to create containers. Images are created with the build command, and they’ll produce a
container when started with run. Images are stored in a Docker registry such as
registry.hub.docker.com because they can become quite large, images are designed to
be composed of layers of other images, allowing a minimal amount of data to be sent
when transferring images over the network.
Q3. How exactly are containers (Docker) different from hypervisor virtualization (vSphere)? What are the benefits?
Q2. What are the advantages that Containerization provides over virtualization?
Below are the advantages of containerization over virtualization:
- Containers provide real-time provisioning and scalability but VMs provide slow provisioning
- Containers are lightweight when compared to VMs
- VMs have limited performance when compared to containers
- Containers have better resource utilization compared to VMs
Q1. What are containers?
Containers are used to provide consistent computing environment from a developer’s laptop to a test environment, from a staging environment into production.
Now give a definition of containers, a container consists of an entire runtime environment: an application, plus all its dependencies, libraries and other binaries, and configuration files needed to run it, bundled into one package. Containerizing the application platform and its dependencies removes the differences in OS distributions and underlying infrastructure.