-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(Docker): added dockerfile, docker build and docker run docume…
…nts. Must fix to run on host multicast network.
- Loading branch information
1 parent
488be7c
commit a58f98b
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM ubuntu:20.04 | ||
|
||
RUN apt-get update && apt-get install -y build-essential make git g++ protobuf-compiler sudo net-tools iputils-ping | ||
RUN apt-get clean | ||
|
||
## Download VSSS files | ||
WORKDIR /app | ||
RUN git clone https://github.com/ger-unicamp/VSSSClient.git /app/client | ||
|
||
## Build protobuffer files | ||
WORKDIR /app/client/src/pb/proto | ||
RUN chmod +x compile.sh && ./compile.sh | ||
|
||
# Exec | ||
WORKDIR /app/client/src | ||
RUN make | ||
|
||
CMD ./vss.exe |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
DOCKER_IMAGE=ger-vsss | ||
|
||
docker build -t $DOCKER_IMAGE . |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
DOCKER_IMAGE=ger-vsss | ||
CONTAINER_NAME=$DOCKER_IMAGE-container | ||
|
||
docker run -it --rm \ | ||
--name $CONTAINER_NAME \ | ||
--user=$(id -u) \ | ||
--env="DISPLAY" \ | ||
--env="QT_X11_NO_MITSHM=1" \ | ||
--memory=1024g \ | ||
--oom-kill-disable \ | ||
--ipc="host" \ | ||
--volume="/dev:/dev" \ | ||
--privileged \ | ||
--network=host \ | ||
--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 |