-
Notifications
You must be signed in to change notification settings - Fork 122
Docker Instuction
- Compatibility/Dependency
- Long setup time
- Different Dev/Test/Prod environments
We need something that could help us with the above issue and something that will allow us to modify or change these components without affecting the other components and even modify the underlying operating system as required. With docker, we are able to run each component in a separate container with its own dependencies and its own libraries.
Containers are completely isolated environments, as in they have their processes or services or their network like virtual machines, except they share the same OS kernel.
-
docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
The docker run command first creates a writeable container layer over the specified image, and then starts it using the specified command.
-
docker ps [OPTIONS]
List containers.
-
docker stop [OPTIONS] CONTAINER [CONTAINER...]
The main process inside the container will receive SIGTERM, and after a grace period, SIGKILL. The first signal can be changed with the STOPSIGNAL instruction in the container’s Dockerfile, or the --stop-signal option to docker run.
-
docker rm [OPTIONS] CONTAINER [CONTAINER...]
Remove one or more containers.
-
docker images [OPTIONS] [REPOSITORY[:TAG]]
List images.
-
docker rmi [OPTIONS] IMAGE [IMAGE...]
Removes (and un-tags) one or more images from the host node. If an image has multiple tags, using this command with the tag as a parameter only removes the tag. If the tag is the only one for the image, both the image and the tag are removed.
-
docker pull [OPTIONS] NAME[:TAG|@DIGEST]
Pull an image or a repository from a registry.
-
docker attach [OPTIONS] CONTAINER
Use docker attach to attach your terminal’s standard input, output, and error (or any combination of the three) to a running container using the container’s ID or name. This allows you to view its ongoing output or to control it interactively, as though the commands were running directly in your terminal.