From 1e91b889c9942b10297288cd28e0917c7ea3b47d Mon Sep 17 00:00:00 2001 From: abregman Date: Mon, 21 Oct 2019 22:58:41 +0300 Subject: [PATCH] Add a couple of Docker questions --- README.md | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 78 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 52af98b..c2ad021 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ :information_source:  This repository contains interview questions on various DevOps related topics -:bar_chart:  There are currently **351** questions +:bar_chart:  There are currently **362** questions :warning:  You don't need to know how to answer all the questions in this repo. DevOps is not about knowing all :) @@ -20,13 +20,13 @@ - + - + @@ -43,7 +43,7 @@ - +
DevOps
DevOps

Beginner :baby:
Advanced :star:
Jenkins
Jenkins

Beginner :baby:
Advanced :star:
Jenkins
Jenkins

Beginner :baby:
Advanced :star:
Git
Git

Beginner :baby:
Advanced :star:
Linux
Linux

Beginner :baby:
Advanced :star:
Network
Network

Beginner :baby:
Advanced :star:
Ansible
Ansible

Beginner :baby:
Advanced :star:
Terraform
Terraform

Beginner :baby:
Advanced :star:
Docker
Docker

Beginner :baby:
Docker
Docker

Beginner :baby:
Advanced :star:
Python
Python

Beginner :baby:
Advanced :star:
azure
Azure

Beginner :baby:
openstack
OpenStack

Beginner :baby:
security
Security

Beginner :baby:
puppet
Puppet

Beginner :baby:
puppet
Puppet

Beginner :baby:
Advanced :star:
@@ -1409,6 +1409,10 @@ List #### :baby: beginner +
+What is Docker? What are you using it for?
+
+
How containers are different from VMs?
@@ -1430,7 +1434,11 @@ You should choose containers when:
-What happens when you run `docker run hello-world`?
+Explain Docker architecture
+
+ +
+Describe in detail what happens when you run `docker run hello-world`?
Docker CLI passes your request to Docker daemon. Docker daemon downloads the image from Docker Hub @@ -1443,7 +1451,7 @@ Docker daemon redirects output from container to Docker CLI which redirects it t
-What do you see when you run `docker ps`?
+What best practices are you familiar related to working with containers?
@@ -1454,6 +1462,30 @@ Docker daemon redirects output from container to Docker CLI which redirects it t How would you transfer data from one container into another?
+
+What happens to data of the container when a container exists?
+
+ +
+Explain what each of the following commands do: + + * docker run + * docker rm + * docker ps + * docker build + * docker commit
+
+ +
+How do you remove old, non running, containers?
+
+ +##### Dockerfile + +
+What is Dockerfile
+
+
What is the difference between ADD and COPY in Dockerfile?
@@ -1485,10 +1517,29 @@ you with more options/features compared to Docker Hub. One example is Swarm management which means you can create new swarms in Docker Cloud.
+
+Where Docker images are stored?
+
+
Explain image layers
+ +#### :star: Advanced + +
+How do you manage persistent storage in Docker?
+
+ +
+How can you connect from the inside of your container to the localhost of your host, where the container runs?
+
+ +
+How do you copy files from Docker container to the host and vice versa?
+
+ ## Kubernetes @@ -1703,7 +1754,6 @@ Shortest way is: my_string[::-1] but it doesn't mean it's the most * Radix Sort
- #### :star: Advanced @@ -1909,6 +1959,27 @@ func main() {
+
+The following block of code tries to convert the integer 101 to a string but instead we get "e". Why is that? How to fix it? + +``` +package main + +import "fmt" + +func main() { + var x int = 101 + var y string + y = string(x) + fmt.Println(y) +} +``` +
+ +It looks what unicode value is set at 101 and uses it for converting the integer to a string. +If you want to get "101" you should use the package "strconv" and repalce y = string(x) with y = strconv.Itoa(x) +
+ ## Mongo