Skip to content

Instantly share code, notes, and snippets.

@marcin-jozwikowski
Last active October 31, 2019 14:02
Show Gist options
  • Save marcin-jozwikowski/e3487f88140745ded96144cceb384cef to your computer and use it in GitHub Desktop.
Save marcin-jozwikowski/e3487f88140745ded96144cceb384cef to your computer and use it in GitHub Desktop.
##############################################################################################################################
#
#
# bp=$(realpath $(pwd))/builds && mkdir $bp -p && docker run -ti -v $bp/:/OpenTTDReleases/ --rm ottd_builder bash -c '/run.sh'
#
#
##############################################################################################################################
FROM ubuntu:19.04
ENV DEBIAN_FRONTEND=noninteractive
LABEL \
maintainer="[email protected]" \
org.label-schema.description="OpenTTD Compile-Farm images" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://www.openttd.org/" \
org.label-schema.vcs-url="https://github.com/OpenTTD/OpenTTD-CF" \
org.label-schema.vendor=OpenTTD
# Dependencies needed to compile OpenTTD
RUN apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && \
apt-get install -y --no-install-recommends \
\
binutils \
bzip2 \
ca-certificates \
cmake \
git \
gnupg2 \
gcc \
g++ \
libc6-dev \
libfile-fcntllock-perl \
libfontconfig-dev \
libicu-dev \
liblzma-dev \
liblzo2-dev \
libsdl1.2-dev \
libsdl2-dev \
libxdg-basedir-dev \
make \
software-properties-common \
tar \
wget \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /OpenTTDReleases
RUN echo "#!/bin/sh" >> /run.sh && \
echo "now=$(date +%Y%m%d_%H%M%S)" >> /run.sh && \
echo "cd / && git clone https://github.com/OpenTTD/OpenTTD.git && cd /OpenTTD && \ " >> /run.sh && \
echo "./configure && make && \ " >> /run.sh && \
echo "mkdir /OpenTTDReleases/$now -p && cp /OpenTTD/bin/* /OpenTTDReleases/$now -r" >> run.sh && \
chmod +x /run.sh
VOLUME /OpenTTDReleases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment