-
Notifications
You must be signed in to change notification settings - Fork 0
/
rundocker.sh
31 lines (27 loc) · 995 Bytes
/
rundocker.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
DEFAULT_DOCKER_IMAGE="docker_poti"
DEFAULT_CONTAINER_NAME="docker_poti_container"
WORK_DIR=
CONTAINER_WORK_DIR=$WORK_DIR
CONTAINER_NAME=$DEFAULT_CONTAINER_NAME
DOCKER_IMAGE=$DEFAULT_DOCKER_IMAGE
# Executando o docker
docker run -it \
--user=$(id -u) \
--env="DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
--name=$CONTAINER_NAME \
--memory=1024g \
--oom-kill-disable \
--ipc="host" \
--volume="/dev:/dev" \
--privileged \
--net=host \
--workdir="${CONTAINER_WORK_DIR}" \
--volume="${WORK_DIR}:${CONTAINER_WORK_DIR}" \
--volume="/etc/group:/etc/group:ro" \
--volume="/etc/passwd:/etc/passwd:ro" \
--volume="/etc/shadow:/etc/shadow:ro" \
--volume="/etc/sudoers.d:/etc/sudoers.d:ro" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
$DOCKER_IMAGE
docker container rm $CONTAINER_NAME -f