Add more Docker commands
This commit is contained in:
parent
3ff1bdb160
commit
2ad3571346
|
@ -37,11 +37,25 @@ docker ps -a
|
|||
docker start <container-id>
|
||||
docker start <container-name>
|
||||
|
||||
# Stop a container with a <container-id> or <container-name>.
|
||||
docker stop <container-id>
|
||||
docker stop <container-name>
|
||||
# Stop a container.
|
||||
docker stop <container>
|
||||
|
||||
# Restart a container.
|
||||
docker restart <container>
|
||||
|
||||
# Remove/delete a container.
|
||||
docker rm <container>
|
||||
|
||||
# View container's logs.
|
||||
docker logs <container>
|
||||
```
|
||||
|
||||
## Working with Running Containers
|
||||
```bash
|
||||
docker cp path/to/file <container>:./destination/path/
|
||||
|
||||
# Run bash on the container, if installed.
|
||||
docker exec -it <container> bash
|
||||
```
|
||||
|
||||
# Remove a container with a <container-id> or <container-name>.
|
||||
docker rm <container-id>
|
||||
docker rm <container-name>
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue