-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
37 lines (32 loc) · 1.25 KB
/
justfile
File metadata and controls
37 lines (32 loc) · 1.25 KB
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
image := "crypt"
project_dir := "/home/easy/project"
build:
@echo "Building the {{image}}."
docker build -t {{image}} .
xhost-docker:
xhost +local:docker
bash: build xhost-docker
docker run -h {{image}} -e DISPLAY=$DISPLAY \
--net=host \
-v /tmp/.X11-unix:/tmp/.X11-unix \
--env="QT_X11_NO_MITSHM=1" \
--mount type=bind,source=$(readlink -f ./src),target={{project_dir}} \
--mount type=bind,source=$(readlink -f ./script),target=/tmp/script \
-it {{image}} \
-c "cd /tmp/script; bash entrypoint.sh bash"
emacs: build xhost-docker
docker run -h {{image}} -e DISPLAY=$DISPLAY \
--net=host \
-v /tmp/.X11-unix:/tmp/.X11-unix \
--env="QT_X11_NO_MITSHM=1" \
--mount type=bind,source=$(readlink -f ./src),target={{project_dir}} \
--mount type=bind,source=$(readlink -f ./script),target=/tmp/script \
-it {{image}} \
-c "cd /tmp/script; bash entrypoint.sh emacs-gtk"
test: build
docker run -h {{image}} \
--net=host \
--mount type=bind,source=$(readlink -f ./src),target={{project_dir}} \
--mount type=bind,source=$(readlink -f ./script),target=/tmp/script \
{{image}} \
-c "cd /tmp/script; bash test.sh"