khanat-server-docker-NeL/builder/debian/stretch/x86_64/Dockerfile

108 lines
4.6 KiB
Text
Raw Normal View History

# Dockerfile - Build environment to compile khanat server
#
# Copyright (C) 2017 AleaJactaEst
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# to build :
# $ docker build . -t builder_khanat_jessie_x86_64 --file dist/docker/builder/debian-8-amd64/Dockerfile
# to use this image :
# (on root)
# $ docker run -it --hostname=builder -v $PWD/dist:/opt/dist -v $PWD/code:/opt/code builder_khanat_jessie_x86_64 /bin/bash
# (with your account)
# $ docker run -it --hostname=builder -u "$(id -u $USERNAME):$(id -g $USERNAME)" -v $PWD/dist:/opt/dist -v $PWD/code:/opt/code builder_khanat_jessie_x86_64 /bin/bash
FROM amd64/debian:9
MAINTAINER AleaJactaEst
ENV HOSTNAME builder
RUN apt-get update ; \
apt-get dist-upgrade -y ; \
DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server ; \
apt-get install -y apache2 \
php \
libapache2-mod-php \
php-mysql \
apache2-utils \
php-gd \
php-imagick ; \
apt-get install -y git \
libcurl4-openssl-dev \
libluabind-dev \
libfreetype6-dev \
libx11-dev \
libgl1-mesa-dev \
libxxf86vm-dev \
libxrandr-dev \
libxrender-dev \
libopenal-dev \
libogg-dev \
libvorbis-dev \
libxml2-dev \
cmake \
build-essential \
libpng-dev \
libjpeg62-turbo-dev \
rrdtool \
bison \
libxmu-dev \
autoconf \
automake \
default-libmysqlclient-dev \
libgif-dev \
cpputest \
libssl-dev \
liblzma-dev \
unzip \
zlib1g-dev \
libssh2-1-dev \
libboost-all-dev \
libopenal-dev \
libgl1-mesa-dev \
libogg-dev \
mercurial \
wget \
autogen \
libtool \
libtool-bin
## Build & Install cpptest
# Impossible to build release 1.1.0, 1.1.1, 1.1.2
RUN mkdir -p /opt/src
RUN wget -q https://github.com/cpptest/cpptest/archive/1.0.5.tar.gz -O /opt/src/cpptest.tar.gz || exit 2
RUN rm -rf /opt/src/cpptest
RUN tar xvf /opt/src/cpptest.tar.gz -C /opt/src --strip 1 || exit 2
RUN cd /opt/src/cpptest && ./autogen.sh && ./configure && make && make install || exit 2
## Build & Install squish
RUN mkdir -p /opt/src
RUN cd /opt/src; wget -c https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libsquish/squish-1.11.zip
RUN cd /opt/src; unzip squish-1.11.zip
COPY dist/docker/builder/common/squish-limit.patch /opt/squish-limit.patch
RUN cd /opt/src/squish-1.11; patch -i /opt/squish-limit.patch || exit 2
RUN cd /opt/src/squish-1.11; make || exit 2
RUN cd /opt/src/squish-1.11; make install || exit 2
## Build & Install CURL - 7.46.0
RUN wget -q https://curl.haxx.se/download/curl-7.55.1.tar.gz -O /opt/src/curl.tar.gz
RUN mkdir -p /opt/src/curl/build
RUN tar xvf /opt/src/curl.tar.gz -C /opt/src/curl --strip 1 || exit 2
RUN cd /opt/src/curl/build; cmake -DCMAKE_BUILD_TYPE=Release -DCURL_ZLIB=ON -DBUILD_CURL_EXE=OFF -DCURL_STATICLIB=ON -DHTTP_ONLY=ON -DENABLE_IPV6=ON -DCMAKE_USE_OPENSSL=ON -DOPENSSL_SSL_LIBRARIES=/usr/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARIES=/usr/lib/libcrypto.a -DCMAKE_USE_LIBSSH2=OFF -DZLIB_LIBRARY=/usr/lib/x86_64-linux-gnu/libz.a .. || exit 2
RUN cd /opt/src/curl/build; make || exit 2
RUN cd /opt/src/curl/build; make install || exit 2