2024-09-08 01:58:27 +02:00
|
|
|
# Docker Cheatsheet
|
|
|
|
|
|
|
|
### Run interactive, temporary container
|
|
|
|
|
|
|
|
```
|
2024-09-28 10:17:52 +02:00
|
|
|
docker run --rm -it [image]
|
2024-09-08 01:58:27 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
### Kill container
|
|
|
|
|
|
|
|
```
|
2024-09-28 10:17:52 +02:00
|
|
|
docker kill [id]
|
2024-09-08 01:58:27 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
### Remove container
|
|
|
|
|
|
|
|
```
|
2024-09-28 10:17:52 +02:00
|
|
|
docker rm [id]
|
2024-09-08 01:58:27 +02:00
|
|
|
```
|
2024-09-28 10:17:52 +02:00
|
|
|
|
|
|
|
### Get container logs
|
|
|
|
|
|
|
|
```
|
|
|
|
docker logs [id]
|
|
|
|
```
|
|
|
|
|
|
|
|
### List active containers
|
|
|
|
|
|
|
|
```
|
|
|
|
docker ps
|
|
|
|
```
|
|
|
|
|
|
|
|
### List all containers
|
|
|
|
|
|
|
|
```
|
|
|
|
docker ps --all
|
|
|
|
```
|