Docker Flashcards
Ducker Run
Tells Docker daemon to deploy the specified image to a docker Host and Start to run(as a container)D
Docker Build
Converts a dockerfile or file/program into an image using the specifications of the dockerfile
Docker Pull
asks the daemon to ‘Look for’ and download the specified image either from docker Hub or a specified Location
Docker Push
Upload a file up to a Repository as specified
Writable layers
Writable layers are linked to the lifecycle of the container.
They don’t persist.
docker run command
~$ docker run 8080:80 containerName
where Tcp80 is the port on the container and 8080, the host port
run docker on detached mode
~$ docker run -p 8080:80 -d containerImageName
where Tcp80 is the port on the container and 8080, the host port
Execute commands inside container
$ docker exec -it RunningContainer_id commands
-it is a combination of both the -i and -t command options
docker processes commands
docker ps
all === -aux
$ docker ps -a
shows all container processes
the -t option
-t option, which allocates a pseudo-TTY to the container. The -t option is typically used when you want to interact with the container’s shell or terminal. However, it’s not typically used with -d (detached) because detached containers don’t have an interactive terminal.