DOCKER Flashcards
What command would you use to install docker?
Docker pull / Docker pull Ubuntu5.5:latest
Before completing stall, you been advised to check latest using what command?
$ curl -fsDL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add-
Instead of manual tagging of images to give names, which alternative command can one use to tag images?
docker commit
What are Ephemeral volumes?
volumes shared between containers and host or both and only exist while container is using them.
What is the imperative command for creating a docker volume?
Docker volume create [options] [volume]
What is command for deleting a docker container
docker container rm [container_name /container_id]
How do you first get a docker image from GITHUB?
docker run –name repo alphine/git clone \
https://github.com/docker/getting-start.git
docker cp repo:/git/getting_started/
how do you build docker image ?
docker build -t docker101tutorial
How do you run docker container and push it ?
docker run -d -p 80:80 \
–name docker-tutorial docker101tutorial
docker tag docker101tutorial folder/docker101tutorial
docker push folder/docker101tutorial
What is benefit of docker Compose?
Used as single machine coordination
Designed for testing and development
What command is used to set the registry to which an image will be uploaded to?
docker tag
What command do you use to add one directory to another in docker?
mount -o bind first-directory seconddirectory
When mounting volumes between host and guest which one comes first?
Mounting volumes always mounts the host filesystem over the guest.
which docker feature is used to contain networks?
Linux namespaces provide isolation for running processes, limiting their access to system resources.
What command is used to get permission to add directories into container?
You need to overide the default permission by running the command
$docker run -ti –rm –privilaged=true ubuntu bash