Fix the docker build

fixes #334
This commit is contained in:
Konstantinos Sideris 2018-09-08 23:37:24 +03:00
parent 72333aec59
commit c347c0d5f5
4 changed files with 39 additions and 32 deletions

View File

@ -24,8 +24,8 @@ if [ $TRAVIS_OS_NAME == linux ]; then
QT_PKG="59" QT_PKG="59"
fi fi
wget https://cmake.org/files/v3.11/cmake-3.11.4-Linux-x86_64.sh wget https://cmake.org/files/v3.12/cmake-3.12.2-Linux-x86_64.sh
sudo sh cmake-3.11.4-Linux-x86_64.sh --skip-license --prefix=/usr/local sudo sh cmake-3.12.2-Linux-x86_64.sh --skip-license --prefix=/usr/local
sudo add-apt-repository -y ppa:chris-lea/libsodium sudo add-apt-repository -y ppa:chris-lea/libsodium
sudo add-apt-repository -y ppa:beineri/opt-qt${QT_VERSION}-trusty sudo add-apt-repository -y ppa:beineri/opt-qt${QT_VERSION}-trusty

View File

@ -31,10 +31,7 @@ unset QT_PLUGIN_PATH
unset LD_LIBRARY_PATH unset LD_LIBRARY_PATH
export ARCH=$(uname -m) export ARCH=$(uname -m)
export LD_LIBRARY_PATH=.deps/usr/lib/:$LD_LIBRARY_PATH
if [ ! -z $TRAVIS_TAG ]; then
export LD_LIBRARY_PATH=.deps/usr/lib/:$LD_LIBRARY_PATH
fi
./linuxdeployqt*.AppImage ${DIR}/usr/share/applications/*.desktop -bundle-non-qt-libs ./linuxdeployqt*.AppImage ${DIR}/usr/share/applications/*.desktop -bundle-non-qt-libs
./linuxdeployqt*.AppImage ${DIR}/usr/share/applications/*.desktop -appimage ./linuxdeployqt*.AppImage ${DIR}/usr/share/applications/*.desktop -appimage

View File

@ -1,36 +1,38 @@
FROM ubuntu:xenial FROM ubuntu:trusty
RUN \ RUN \
apt-get update -qq && \ apt-get update -qq && \
apt-get install -y software-properties-common apt-get install -y software-properties-common && \
add-apt-repository -y ppa:beineri/opt-qt-5.10.1-trusty && \
RUN \ add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
add-apt-repository -y ppa:beineri/opt-qt-5.10.1-xenial && \ add-apt-repository -y ppa:chris-lea/libsodium && \
apt-get update -qq && \ apt-get update -qq && \
apt-get install -y \ apt-get install -y \
qt510base \ qt510base qt510tools qt510svg qt510multimedia \
qt510tools \ gcc-5 g++-5
qt510svg \
qt510multimedia
RUN \ RUN \
add-apt-repository ppa:ubuntu-toolchain-r/test && \ apt-get install -y \
apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main" && \ make \
apt-get update -qq && \ pkg-config \
apt-get install -y --allow-unauthenticated \ ninja-build \
gcc-7 \ libsodium-dev \
g++-7 \ liblmdb-dev \
cmake \ libssl-dev \
clang-5.0 \ mesa-common-dev \
clang-format-5.0 \ wget \
liblmdb-dev fuse \
git
RUN apt-get install -y mesa-common-dev wget fuse git RUN \
wget https://cmake.org/files/v3.12/cmake-3.12.2-Linux-x86_64.sh && \
sudo sh cmake-3.12.2-Linux-x86_64.sh --skip-license --prefix=/usr/local
RUN update-alternatives --install \ RUN \
/usr/bin/clang-format \ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10 && \
clang-format \ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10 && \
/usr/bin/clang-format-5.0 100 update-alternatives --set gcc "/usr/bin/gcc-5" && \
update-alternatives --set g++ "/usr/bin/g++-5"
ENV PATH=/opt/qt510/bin:$PATH ENV PATH=/opt/qt510/bin:$PATH

View File

@ -15,6 +15,10 @@ third-party:
-DUSE_BUNDLED_BOOST=OFF -DUSE_BUNDLED_BOOST=OFF
@cmake --build ${DEPS_BUILD_DIR} @cmake --build ${DEPS_BUILD_DIR}
docker-third-party:
@cmake -GNinja -H${DEPS_SOURCE_DIR} -B${DEPS_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release
@cmake --build ${DEPS_BUILD_DIR}
ci: ci:
cmake -H${DEPS_SOURCE_DIR} -B${DEPS_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release cmake -H${DEPS_SOURCE_DIR} -B${DEPS_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release
cmake --build ${DEPS_BUILD_DIR} cmake --build ${DEPS_BUILD_DIR}
@ -48,8 +52,12 @@ macos-deploy:
docker-app-image: image docker-app-image: image
docker run \ docker run \
-e CXX=g++-7 \ -e CXX=g++-5 \
-e CC=gcc-7 \ -e CC=gcc-5 \
-v `pwd`:/build nheko-app-image make docker-third-party
docker run \
-e CXX=g++-5 \
-e CC=gcc-5 \
-v `pwd`:/build nheko-app-image make release -v `pwd`:/build nheko-app-image make release
docker run \ docker run \
--privileged \ --privileged \