aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/cheat/docker
diff options
context:
space:
mode:
authorcbreton <corentin.breton@fullsave.com>2019-12-18 11:51:36 +0100
committercbreton <corentin.breton@fullsave.com>2019-12-18 11:58:58 +0100
commitecc25dcecac342a7b39376ba969f1c5ea25a8aaa (patch)
tree0ecf1c44b61b08bd2ba35bd9a01e78953ed2bf96 /dotfiles/cheat/docker
parent649f04f75130b85a2c8efd10b9edee41c26d3f46 (diff)
downloaddotfiles_dotdrop-ecc25dcecac342a7b39376ba969f1c5ea25a8aaa.zip
dotfiles_dotdrop-ecc25dcecac342a7b39376ba969f1c5ea25a8aaa.tar.xz
Add more cheats
Diffstat (limited to 'dotfiles/cheat/docker')
-rw-r--r--dotfiles/cheat/docker9
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>