From 7f64558b12d0bf699789463e41e0b95c0174af98 Mon Sep 17 00:00:00 2001 From: Diadlo Date: Wed, 27 Jun 2018 09:53:48 +0300 Subject: [PATCH] chore(docker): Add Dockerfile for debian and helper scripts --- docker/Dockerfile.debian | 46 ++++++++++++++++++++++++++++++++++++++++ docker/build-debian.sh | 5 +++++ docker/start-qtox.sh | 7 ++++++ 3 files changed, 58 insertions(+) create mode 100644 docker/Dockerfile.debian create mode 100755 docker/build-debian.sh create mode 100755 docker/start-qtox.sh diff --git a/docker/Dockerfile.debian b/docker/Dockerfile.debian new file mode 100644 index 000000000..e1a41b128 --- /dev/null +++ b/docker/Dockerfile.debian @@ -0,0 +1,46 @@ +FROM debian:stretch + +RUN apt-get update && \ + apt-get -y --force-yes install \ + automake \ + autotools-dev \ + build-essential \ + check \ + checkinstall \ + cmake \ + ffmpeg \ + git \ + libavcodec-dev \ + libavdevice-dev \ + libexif-dev \ + libgdk-pixbuf2.0-dev \ + libgtk2.0-dev \ + libopenal-dev \ + libopus-dev \ + libqrencode-dev \ + libqt5opengl5-dev \ + libqt5svg5-dev \ + libsodium-dev \ + libsqlcipher-dev \ + libtool \ + libvpx-dev \ + libxss-dev \ + pkg-config \ + qrencode \ + qt5-default \ + qttools5-dev \ + qttools5-dev-tools \ + yasm + +RUN git clone https://github.com/toktok/c-toxcore.git /toxcore +WORKDIR /toxcore +RUN git checkout v0.2.2 && \ + cmake . && \ + cmake --build . && \ + make install && \ + echo '/usr/local/lib/' >> /etc/ld.so.conf.d/locallib.conf && \ + ldconfig + +COPY . /qtox +WORKDIR /qtox +RUN cmake . && cmake --build . diff --git a/docker/build-debian.sh b/docker/build-debian.sh new file mode 100755 index 000000000..d15c4a476 --- /dev/null +++ b/docker/build-debian.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +cd "$(dirname "$0")/.." +docker build . -f docker/Dockerfile.debian -t qtox +cd - diff --git a/docker/start-qtox.sh b/docker/start-qtox.sh new file mode 100755 index 000000000..8162f43b3 --- /dev/null +++ b/docker/start-qtox.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +XSOCK=/tmp/.X11-unix +XAUTH=/tmp/.docker.xauth +touch $XAUTH +xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge - +docker run -ti --rm -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH -e DISPLAY=$DISPLAY -e XAUTHORITY=$XAUTH qtox ./qtox