Quiz Docker

04/01/2022   Docker
Linux
- You can list downloaded Docker images using the command: docker images, docker image ls
- A Docker container can have its PID's namespaced the host OS by adding the option --pid host when running the container.
- `docker run ubuntu echo "Hello, world!"` => Docker will see there's no local copy of the ubuntu image and look in the registry to pull it down before executing the `run` command against it.
- docker run busybox` and `docker create busybox` => The `run` command is an alias to the pull and create commands. `create` won't work if you haven't pulled the image of the container you're trying to run first.
- Most images are usually built in "layers" using a child-parent relationship. For example an `ubunut:16.04` image is built upon a number of parent images. Those images contain common libraries and dependencies for the child image (Ubuntu). => The advantage of this model is that common layers don't need to be re-installed. Instead you can download several versions of the same applications without having to redeploy its common dependencies.
- If you have a running container named "checker" you can see the logs of that container with `docker logs checker`
------------------------------
https://www.proprofs.com/quiz-school/story.php?title=docker-quiz
https://www.educative.io/courses/working-with-containers-docker-docker-compose/gkkWKV94Om6
https://quizizz.com/admin/quiz/5b082546a94abc0019be8b25/docker

