Last active
February 17, 2021 12:18
-
-
Save devymex/814e02fa0d1500b4b2c8abb04ba2bda3 to your computer and use it in GitHub Desktop.
docker_commands
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
# conceptions: static images, running containers | |
docker image ls # list all images | |
docker image rm IMAGE_NAME # remove image | |
docker run -t -i -d --rm --env=DISPLAY=$DISPLAY --net=host IMAGE_NAME /bin/bash # run a image | |
docker exec -it CONTAINER_NAME /bin/bash # enter a container | |
docker kill CONTAINER_NAME # kill a running container | |
docker rm CONTAINER_NAME # remove a container | |
docker ps # list all containers | |
docker commit CONTAINER_NAME # save container to image | |
docker cp FILE CONTAINER_NAME:/FILE # copy file from host to container |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment