forked from HenryAEvans/EE431_Toolchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·38 lines (34 loc) · 1003 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Select Local or Remote Container
if [ "$1" = "-l" ] || [ "$1" = "--local" ]; then
CONTAINER=carp_tools
else
CONTAINER=fwilken/carp_tools:latest
fi
# Mac Install
if [[ "$OSTYPE" == "darwin"* ]]; then
set -x
xhost -
xhost +localhost
docker run -it --rm \
--platform linux/amd64 \
-v $(pwd)/workspace:/home/carp/workspace:rw \
-e DISPLAY=host.docker.internal:0 \
-e "TERM=xterm-256color"\
--hostname carp_docker \
$CONTAINER bash
# Linux/WSL Install
else
set -x
xhost local:root
docker run -it --rm -v $(pwd)/workspace:/home/carp/workspace:rw\
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /mnt/wslg:/mnt/wslg \
-e DISPLAY \
-e WAYLAND_DISPLAY \
-e XDG_RUNTIME_DIR \
-e PULSE_SERVER \
-e "TERM=xterm-256color"\
--hostname ee431-docker \
--net=host \
$CONTAINER bash
fi