cb19003b53
Signed-off-by: fly <merspieler@alwaysdata.net>
63 lines
2.5 KiB
Docker
63 lines
2.5 KiB
Docker
FROM docker.io/library/debian:bullseye-20220822 AS build
|
|
|
|
# Install basic tools and dependencies
|
|
RUN apt-get -y update &&\
|
|
apt-get install -y git sudo dctrl-tools autoconf automake autotools-dev cmake cpp-9 g++-9 gcc.9 sed \
|
|
libboost-dev libboost-program-options-dev libboost-system-dev libboost-chrono-dev libboost-atomic-dev libboost-date-time-dev \
|
|
libboost-serialization-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libplib-dev \
|
|
libfreetype-dev libjpeg-dev libgif-dev libtiff-dev libpng-dev libxmu-dev libxi-dev zlib1g libcgal-dev libopenal-dev \
|
|
libopenscenegraph-dev libcurl4-openssl-dev libgdal-dev
|
|
|
|
ENV SG_VERSION e2755a302449fd2c447deaee50c3016402bf0353
|
|
ENV FG_VERSION b71b27ea18d43169d3e91882b23c6af3fc01297d
|
|
ENV TG_VERSION 155a5d240f4440dd877f40ce64ecb7c6f112700c
|
|
# any later fgmeta will abort cause run as root
|
|
ENV FGMETA_VERSION 45917d6075d942437dc8b63b7ec9d84ffe60b408
|
|
|
|
RUN git clone https://git.code.sf.net/p/flightgear/fgmeta &&\
|
|
cd fgmeta &&\
|
|
git checkout $FGMETA_VERSION &&\
|
|
cd .. &&\
|
|
mkdir terragear &&\
|
|
cd terragear &&\
|
|
git clone https://git.merspieler.tk/fly/terragear &&\
|
|
cd terragear &&\
|
|
git checkout $TG_VERSION &&\
|
|
cd .. &&\
|
|
git clone https://git.code.sf.net/p/flightgear/simgear &&\
|
|
cd simgear &&\
|
|
git checkout $SG_VERSION &&\
|
|
cd .. &&\
|
|
git clone https://git.code.sf.net/p/flightgear/flightgear &&\
|
|
cd flightgear &&\
|
|
git checkout $FG_VERSION
|
|
|
|
RUN export SG_CMAKEARGS="-DENABLE_TESTS=OFF" && cd terragear && CC=gcc-9 CXX=g++-9 ../fgmeta/download_and_compile.sh -j $(nproc) -dn -pn SIMGEAR TERRAGEAR FGFS
|
|
|
|
# Production image
|
|
FROM docker.io/library/debian:bullseye-20220822
|
|
RUN apt-get -y update &&\
|
|
apt-get install -y vim python3 wget unzip sed \
|
|
libgdal28 libboost-thread1.74.0 libmpfr6 parallel \
|
|
openscenegraph python3-pip && \
|
|
pip3 install fgtools
|
|
|
|
COPY --from=build /terragear/install/terragear/ /terragear/install/terragear
|
|
COPY --from=build /terragear/install/simgear/ /terragear/install/simgear
|
|
COPY --from=build /terragear/install/flightgear/bin/fgelev /terragear/install/flightgear/bin/
|
|
COPY --from=build /terragear/run_genapts.sh /terragear
|
|
COPY --from=build /terragear/run_ogr-decode.sh /terragear
|
|
COPY --from=build /terragear/run_tg-construct.sh /terragear
|
|
COPY fgdata /terragear/install/flightgear/fgdata
|
|
ENV FGROOT /terragear/install/flightgear/fgdata/
|
|
|
|
WORKDIR /aptuptd
|
|
COPY *.py ./
|
|
COPY append-apt.sh .
|
|
VOLUME /aptuptd/logs
|
|
VOLUME /aptuptd/output
|
|
VOLUME /aptuptd/data
|
|
VOLUME /aptuptd/tmp
|
|
VOLUME /aptuptd/work
|
|
VOLUME /aptuptd/stg
|
|
|