Last active
February 1, 2024 13:09
-
-
Save Talhafayyaz11/8919feeca850f9478245f4bdba83b2bc to your computer and use it in GitHub Desktop.
Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DOCKER COMMANDS: | |
1. List all docker containers | |
- COMMAND: docker ps -a | |
2. Docker logs | |
- COMMANDS: docker logs [OPTIONS] CONTAINER | |
3. To remove all docker containers: | |
- COMMAND: docker system prune -a --volumes | |
- WARNING! This will remove: | |
- all stopped containers | |
- all networks not used by at least one container | |
- all volumes not used by at least one container | |
- all images without at least one container associated to them | |
- all build cache | |
4. Get into docker container | |
- COMMAND: docker exec -it <container name> /bin/bash | |
5. Paste files to docker container | |
- COMMAND: docker cp <src-path> <container>:<dest-path> | |
6. Copy files from docker container | |
- COMMAND: docker cp <container>:<src-path> <local-dest-path> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment