diff options
Diffstat (limited to 'dotfiles/cheat/docker')
-rw-r--r-- | dotfiles/cheat/docker | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dotfiles/cheat/docker b/dotfiles/cheat/docker index 591eba4..86187f5 100644 --- a/dotfiles/cheat/docker +++ b/dotfiles/cheat/docker @@ -4,6 +4,12 @@ docker -d # start a container with an interactive shell docker run -ti <image_name> /bin/bash +# exemple run container with python:3 and delete all created files +docker run -it --rm python:3 bash + +# container with mounted volume in read-only +docker run -it -v "/source:/dest:ro" <image_name> bash + # "shell" into a running container (docker-1.3+) docker exec -ti <container_name> bash @@ -33,3 +39,6 @@ docker images IF: dpkg: error: error creating new backup file '/var/lib/dpkg/status-old': Invalid cross-device link E: Sub-process /usr/bin/dpkg returned an error code (2) DO: echo N | sudo tee /sys/module/overlay/parameters/metacopy + +# command for launch GUI soft, sometimes custom Dockerfile is needed +--user $UID -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix <container_name> |