2017-09-11 19:53:03 +00:00
|
|
|
|
# Dockerfile - Build environment to compile khanat server
|
2017-08-08 19:13:59 +00:00
|
|
|
|
#
|
2017-09-11 19:53:03 +00:00
|
|
|
|
# Copyright (C) 2017 AleaJactaEst
|
|
|
|
|
#
|
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
|
# it under the terms of the GNU 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 General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2017-08-08 19:13:59 +00:00
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
# to build :
|
2017-10-11 20:07:06 +00:00
|
|
|
|
# $ docker build . -t builder_khanat_debian_jessie_i686 --file dist/docker/builder/debian-8-i686/Dockerfile
|
2017-08-08 19:13:59 +00:00
|
|
|
|
|
|
|
|
|
# to use this image :
|
|
|
|
|
# (on root)
|
|
|
|
|
# $ docker run -it --hostname=builder -v $PWD/dist:/opt/dist -v $PWD/code:/opt/code builder_debian_8_i686 /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_debian_8_i686 /bin/bash
|
|
|
|
|
|
2017-10-11 20:07:06 +00:00
|
|
|
|
FROM i386/debian:8
|
2017-08-08 19:13:59 +00:00
|
|
|
|
MAINTAINER AleaJactaEst
|
|
|
|
|
|
|
|
|
|
ENV HOSTNAME builder
|
|
|
|
|
|
2017-10-11 20:07:06 +00:00
|
|
|
|
RUN apt-get update ; \
|
|
|
|
|
apt-get dist-upgrade -y ; \
|
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server ; \
|
|
|
|
|
apt-get install -y apache2 \
|
|
|
|
|
php5 \
|
|
|
|
|
libapache2-mod-php5 \
|
|
|
|
|
php5-mysql \
|
|
|
|
|
apache2-utils \
|
|
|
|
|
php5-gd \
|
|
|
|
|
php5-imagick \
|
|
|
|
|
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 \
|
|
|
|
|
libpng12-dev \
|
|
|
|
|
libjpeg62-turbo-dev \
|
|
|
|
|
rrdtool \
|
|
|
|
|
bison \
|
|
|
|
|
libxmu-dev \
|
|
|
|
|
autoconf \
|
|
|
|
|
automake \
|
|
|
|
|
libmysqlclient-dev \
|
|
|
|
|
libgif-dev \
|
|
|
|
|
cpputest \
|
|
|
|
|
libssl-dev \
|
|
|
|
|
liblzma-dev \
|
|
|
|
|
unzip \
|
|
|
|
|
zlib1g-dev \
|
|
|
|
|
libssh-dev \
|
|
|
|
|
libboost-all-dev \
|
|
|
|
|
libopenal-dev \
|
|
|
|
|
libgl1-mesa-dev \
|
|
|
|
|
libogg-dev \
|
|
|
|
|
mercurial \
|
|
|
|
|
wget
|
2017-08-08 19:13:59 +00:00
|
|
|
|
|
|
|
|
|
## Build & Install cpptest
|
|
|
|
|
# Impossible to build release 1.1.0, 1.1.1, 1.1.2
|
2017-10-11 20:07:06 +00:00
|
|
|
|
RUN apt-get install -y wget autogen autoconf automake libtool libtool-bin
|
|
|
|
|
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
|
|
|
|
|
RUN rm -rf /opt/src/cpptest
|
|
|
|
|
RUN tar xvf /opt/src/cpptest.tar.gz -C /opt/src --strip 1
|
|
|
|
|
RUN cd /opt/src/cpptest && ./autogen.sh && ./configure && make && make install
|
2017-08-08 19:13:59 +00:00
|
|
|
|
|
|
|
|
|
## Build & Install Build 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
|
2017-10-11 20:07:06 +00:00
|
|
|
|
RUN cd /opt/src; unzip squish-1.11.zip || exit 2
|
2017-08-29 21:08:14 +00:00
|
|
|
|
COPY dist/docker/builder/common/squish-limit.patch /opt/squish-limit.patch
|
2017-10-11 20:07:06 +00:00
|
|
|
|
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 hg clone http://hg.kervala.net/packaging/
|
|
|
|
|
#RUN mkdir -p packaging/curl/build
|
|
|
|
|
#RUN cd packaging/curl/build; cmake -DCMAKE_BUILD_TYPE=Release -DCURL_ZLIB=ON -DBUILD_CURL_EXE=OFF -DBUILD_CURL_TESTS=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 ..
|
|
|
|
|
#RUN cd packaging/curl/build; make
|
|
|
|
|
#RUN cd packaging/curl/build; make install
|
|
|
|
|
RUN wget -q https://curl.haxx.se/download/curl-7.46.0.tar.gz -O /opt/src/curl.tar.gz || exit 2
|
|
|
|
|
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 -DBUILD_CURL_TESTS=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
|
|
|
|
|
|