Created
February 26, 2020 17:30
-
-
Save kbingham/073e694a2edff2846a90f0972d815133 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
CONTAINER="$1" | |
shift | |
XFORWARD="-e DISPLAY=$DISPLAY.0 -v /tmp/.X11-unix:/tmp/.X11-unix" | |
# | |
# We can now run in 'arm64' containers: | |
# docker run -it --rm multiarch/alpine:aarch64-edge | |
# | |
echo Executing "$@" in "$CONTAINER" | |
docker run \ | |
--cap-add=SYS_PTRACE \ | |
--security-opt seccomp=unconfined \ | |
-v "$PWD":"$PWD" \ | |
-v "$HOME":"$HOME" \ | |
-v "/opt":"/opt" \ | |
-v "/opt/root":"/opt/root" \ | |
-v "/var/lib/tftpboot":"/var/lib/tftpboot" \ | |
$XFORWARD \ | |
-w "$PWD" -it $CONTAINER "$@" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment