-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (26 loc) · 945 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM debian:bullseye-slim as build
ENV OPENGFX_VERSION=7.1
RUN apt-get update && apt-get install -y cmake git
WORKDIR /TDD
RUN git clone https://github.com/OpenTTD/OpenTTD.git .
RUN apt-get install -y build-essential libsdl2-dev
RUN gcc --version
WORKDIR /TDD/build
RUN DCMAKE_BUILD_TYPE=RelWithDebInfo DOPTION_DEDICATED=ON cmake ..
RUN make
WORKDIR /TDD/build/baseset/
RUN apt-get install -y wget unzip
RUN wget -q -O opengfx-${OPENGFX_VERSION}.zip \
https://cdn.openttd.org/opengfx-releases/${OPENGFX_VERSION}/opengfx-${OPENGFX_VERSION}-all.zip ; \
unzip opengfx-${OPENGFX_VERSION}.zip ; \
tar -xf opengfx-${OPENGFX_VERSION}.tar ; \
rm -rf opengfx-*.tar opengfx-*.zip
RUN cp -r /TDD/build/ /tdd
RUN rm -rf /TDD
RUN rm -rf /tdd/CMakeFiles
RUN rm -rf /tdd/src
FROM debian:bullseye-slim as main
COPY --from=build /tdd /tdd
RUN apt-get update && apt-get install -y libsdl2-dev
EXPOSE 3979
ENTRYPOINT ["/tdd/openttd", "-D"]