Skip to content

Commit

Permalink
feature(Docker): added dockerfile, docker build and docker run docume…
Browse files Browse the repository at this point in the history
…nts. Must fix to run on host multicast network.
  • Loading branch information
rodrigocaus committed Nov 8, 2020
1 parent 488be7c commit a58f98b
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Dockerfile
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
5 changes: 5 additions & 0 deletions dockerbuild.sh
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 .
22 changes: 22 additions & 0 deletions rundocker.sh
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

0 comments on commit a58f98b

Please sign in to comment.