From 364d2afd7e353ecc5f46764db97acd4ae2f53a29 Mon Sep 17 00:00:00 2001 From: Salvatore McCarty Date: Tue, 29 Oct 2019 16:19:12 -0700 Subject: [PATCH] [Hacktoberfest] Add and Update useful Docker commands --- source/snippets/docker/index.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/source/snippets/docker/index.md b/source/snippets/docker/index.md index f2014c0..fe8b8f0 100644 --- a/source/snippets/docker/index.md +++ b/source/snippets/docker/index.md @@ -107,17 +107,25 @@ docker image rm //only first 3 characters of hash code is enough fo Docker containers ```bash // list all containers online/offline - docker ps -a docker container ls -a -// remove/stop/kill a certain container +// remove/stop/kill a certain container docker kill rm -``` -//coming out of container without exiting it: ctrl+P+Q + +//coming out of container without exiting it +ctrl+P+Q //searching docker image on docker hub docker search <> //tagging local image with another name docker tag <> <> + +//"SSH" into a running container +docker exec -it <> /bin/bash + +//Execute arbitrary command in container +docker exec -it <> <> + +``` \ No newline at end of file