diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3001843 --- /dev/null +++ b/Dockerfile @@ -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 diff --git a/dockerbuild.sh b/dockerbuild.sh new file mode 100644 index 0000000..f470071 --- /dev/null +++ b/dockerbuild.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +DOCKER_IMAGE=ger-vsss + +docker build -t $DOCKER_IMAGE . diff --git a/rundocker.sh b/rundocker.sh new file mode 100644 index 0000000..42d8ea6 --- /dev/null +++ b/rundocker.sh @@ -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 \ No newline at end of file