Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

[Hacktoberfest] Add and Update useful Docker commands #127

Merged
merged 1 commit into from
Oct 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions source/snippets/docker/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,25 @@ docker image rm <image hash> //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 <container hash>
```
//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 <<image_name>>

//tagging local image with another name
docker tag <<old_image_name>> <<new_image_name>>

//"SSH" into a running container
docker exec -it <<container_name>> /bin/bash

//Execute arbitrary command in container
docker exec -it <<container_name>> <<command>>

```