From 76cc3820fc865c3daea49e79e7f854ee786ffc26 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Thu, 14 Dec 2017 01:23:17 +0200 Subject: [PATCH] Create appimage with docker [ci skip] --- Dockerfile | 38 ++++++++++++++++++++++++++++++++++++++ Makefile | 12 ++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3d94592 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,38 @@ +FROM ubuntu:xenial + +RUN \ + apt-get update -qq && \ + apt-get install -y software-properties-common + +RUN \ + add-apt-repository -y ppa:beineri/opt-qt592-xenial && \ + apt-get update -qq && \ + apt-get install -y \ + qt59base \ + qt59tools \ + qt59multimedia + +RUN \ + add-apt-repository ppa:ubuntu-toolchain-r/test && \ + apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main" && \ + apt-get update -qq && \ + apt-get install -y --allow-unauthenticated \ + gcc-7 \ + g++-7 \ + cmake \ + clang-5.0 \ + clang-format-5.0 \ + liblmdb-dev + +RUN apt-get install -y mesa-common-dev wget fuse git + +RUN update-alternatives --install \ + /usr/bin/clang-format \ + clang-format \ + /usr/bin/clang-format-5.0 100 + +ENV PATH=/opt/qt59/bin:$PATH + +RUN mkdir /build + +WORKDIR /build diff --git a/Makefile b/Makefile index 7cd40ba..20d79ed 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,18 @@ run: lint: @./.ci/format.sh +image: + docker build -t nheko-app-image . + +docker-app-image: image + docker run \ + -e CXX=g++-7 \ + -e CC=gcc-7 \ + -v `pwd`:/build nheko-app-image make release + docker run \ + --privileged \ + -v `pwd`:/build nheko-app-image make linux-appimage + clean: rm -rf build