mirror of
https://github.com/godotengine/build-containers.git
synced 2026-01-04 18:10:06 +03:00
Specifying only a branch like '2019-08' is problematic if upstream commits something between the builds of two containers. We could make a tarball in the first container build and reuse that, but we need the flexibility of Git for some patching in the Android and JavaScript builds, so instead we allow specifying a git tree-ish as the third argument. We can therefore also give a pretty version string to use for the image name as second argument, e.g. 6.6.0.160 for bef1e6335812d32f8eab648c0228fc624b9f8357. As we can't `git clone` a commit hash directly, we still need to provide both branch name and then commit hash for this use case.
48 lines
2.5 KiB
Docker
48 lines
2.5 KiB
Docker
FROM ubuntu:trusty
|
|
|
|
ARG mono_version
|
|
ARG mono_commit
|
|
|
|
RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
|
|
apt-get update && \
|
|
apt-get -y install wget && \
|
|
cd /root && \
|
|
wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F' | apt-key add - && \
|
|
wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x8E51A6D660CD88D67D65221D90BD7EACED8E640A' | apt-key add - && \
|
|
echo 'deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty main' >> /etc/apt/sources.list && \
|
|
echo 'deb http://ppa.launchpad.net/mc3man/trusty-media/ubuntu trusty main' >> /etc/apt/sources.list && \
|
|
apt-get -y update && \
|
|
apt-get -y install --no-install-recommends \
|
|
autoconf automake bzip2 cmake curl gettext git libtool make perl scons xz-utils \
|
|
gcc-8 g++-8 libudev-dev libx11-dev libxcursor-dev libxrandr-dev libasound2-dev libpulse-dev \
|
|
libgl1-mesa-dev libglu1-mesa-dev libxi-dev libxinerama-dev yasm && \
|
|
ln -sf /usr/bin/gcc-ranlib-8 /usr/bin/gcc-ranlib && \
|
|
ln -sf /usr/bin/gcc-ar-8 /usr/bin/gcc-ar && \
|
|
ln -sf /usr/bin/gcc-8 /usr/bin/gcc && \
|
|
ln -sf /usr/bin/g++-8 /usr/bin/g++
|
|
|
|
RUN cd /root && \
|
|
git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
|
|
cd /root/mono && \
|
|
if [ ! -z "${mono_commit}" ]; then git checkout ${mono_commit}; fi && \
|
|
git submodule update --init && \
|
|
NOCONFIGURE=1 ./autogen.sh && \
|
|
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib/mono --disable-boehm --host=x86_64-linux-gnu && \
|
|
make -j && \
|
|
make install && \
|
|
cd /root && \
|
|
cert-sync /etc/ssl/certs/ca-certificates.crt && \
|
|
rm -rf /root/mono && \
|
|
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \
|
|
wget https://download.mono-project.com/repo/ubuntu/pool/main/c/core-setup/msbuild-libhostfxr_3.0.0.2019.04.16.02.13-0xamarin3+ubuntu1604b1_amd64.deb && \
|
|
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild-sdkresolver_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \
|
|
wget https://download.mono-project.com/repo/ubuntu/pool/main/n/nuget/nuget_5.2.0.6090.bin-0xamarin1+ubuntu1604b1_all.deb && \
|
|
dpkg -i --force-all *.deb && \
|
|
sed -i '/Depends.*mono/d' /var/lib/dpkg/status && \
|
|
ln -s /usr/bin/mono /usr/bin/cli && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/ && \
|
|
rm *.deb
|
|
|
|
CMD /bin/bash
|