devops-exercises/tests/testcases/testcase1.md
2019-12-24 19:34:31 +01:00

68 lines
2.0 KiB
Markdown

<details>
<summary>What is Docker? What are you using it for?</summary><br><b>
</b></details>
<details>
<summary>How containers are different from VMs?</summary><br><b>
The primary difference between containers and VMs is that containers allow you to virtualize
multiple workloads on the operating system while in the case of VMs the hardware is being virtualized to
run multiple machines each with its own OS.
</b></details>
<details>
<summary>In which scenarios would you use containers and in which you would prefer to use VMs?</summary><br><b>
You should choose VMs when:
* you need run an application which requires all the resources and functionalities of an OS
* you need full isolation and security
You should choose containers when:
* you need a lightweight solution
* Running multiple versions or instances of a single application
</b></details>
<details>
<summary>Explain Docker architecture</summary><br><b>
</b></details>
<details>
<summary>Describe in detail what happens when you run `docker run hello-world`?</summary><br><b>
Docker CLI passes your request to Docker daemon.
Docker daemon downloads the image from Docker Hub
Docker daemon creates a new container by using the image it downloaded
Docker daemon redirects output from container to Docker CLI which redirects it to the standard output
</b></details>
<details>
<summary>How do you run a container?</summary><br><b>
</b></details>
<details>
<summary>What `docker commit` does?. When will you use it?</summary><br><b>
</b></details>
<details>
<summary>How would you transfer data from one container into another?</summary><br><b>
</b></details>
<details>
<summary>What happens to data of the container when a container exists?</summary><br><b>
</b></details>
<details>
<summary>Explain what each of the following commands do:
* docker run
* docker rm
* docker ps
* docker pull
* docker build
* docker commit</summary><br><b>
</b></details>
<details>
<summary>How do you remove old, non running, containers?</summary><br><b>
</b></details>