2019-12-22 20:22:08 +00:00
|
|
|
# Multi-Stage Build (TacoServer)
|
|
|
|
|
# This stage compiles the various resources that make up TacoServer
|
|
|
|
|
FROM alpine:3.10 as tacobuilder
|
|
|
|
|
|
|
|
|
|
RUN apk --update add git sed less wget nano openssh && \
|
|
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
|
|
|
rm /var/cache/apk/*
|
|
|
|
|
|
|
|
|
|
WORKDIR /tmp
|
|
|
|
|
|
2020-01-08 07:49:43 +00:00
|
|
|
RUN git clone --depth 1 "https://github.com/ChocoTaco1/TacoServer/" && cd ./TacoServer
|
2019-12-22 20:22:08 +00:00
|
|
|
WORKDIR /tmp
|
|
|
|
|
|
2023-10-01 00:32:20 +00:00
|
|
|
RUN git clone --depth 1 "https://github.com/ChocoTaco1/TacoMaps/" && cd ./TacoMaps
|
2019-12-22 20:22:08 +00:00
|
|
|
WORKDIR /tmp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Main Game Server Image
|
2023-10-01 00:32:20 +00:00
|
|
|
FROM i386/debian:bookworm
|
2020-01-08 07:49:43 +00:00
|
|
|
LABEL maintainer="sairuk, amineo, chocotaco"
|
2019-02-13 09:41:52 +00:00
|
|
|
|
|
|
|
|
# ENVIRONMENT
|
|
|
|
|
ARG SRVUSER=gameserv
|
|
|
|
|
ARG SRVUID=1000
|
|
|
|
|
ARG SRVDIR=/tmp/tribes2/
|
2020-01-08 07:49:43 +00:00
|
|
|
ENV INSTDIR=/home/${SRVUSER}/.wine32/drive_c/Dynamix/Tribes2/
|
2019-11-29 01:39:10 +00:00
|
|
|
|
2020-01-08 07:49:43 +00:00
|
|
|
# WINE VERSION: wine = 1.6, wine-development = 1.7.29 for i386-jessie
|
|
|
|
|
ENV WINEVER=wine-development
|
|
|
|
|
ENV WINEARCH=win32
|
|
|
|
|
ENV WINEPREFIX=/home/${SRVUSER}/.wine32/
|
|
|
|
|
|
|
|
|
|
#WINEARCH=win32 WINEPREFIX=/home/gameserv/.wine32/ wine wineboot
|
2019-02-13 09:41:52 +00:00
|
|
|
|
2019-12-22 20:22:08 +00:00
|
|
|
# UPDATE IMAGE
|
|
|
|
|
RUN dpkg --add-architecture i386
|
2023-10-02 00:24:47 +00:00
|
|
|
RUN echo "deb http://deb.debian.org/debian bookworm contrib" > /etc/apt/sources.list
|
2020-01-08 07:49:43 +00:00
|
|
|
RUN apt-get -y update && apt-get -y upgrade
|
2019-02-13 09:41:52 +00:00
|
|
|
|
|
|
|
|
# DEPENDENCIES
|
|
|
|
|
RUN apt-get -y install \
|
|
|
|
|
# -- access
|
|
|
|
|
sudo unzip \
|
|
|
|
|
# -- logging
|
|
|
|
|
rsyslog \
|
|
|
|
|
# -- utilities
|
2023-10-02 00:24:47 +00:00
|
|
|
sed less nano vim file wget gnupg2 software-properties-common git htop winetricks curl \
|
2020-01-08 07:49:43 +00:00
|
|
|
# --- wine
|
|
|
|
|
#${WINEVER} \
|
|
|
|
|
# -- display
|
|
|
|
|
xvfb
|
|
|
|
|
|
2020-02-01 03:42:50 +00:00
|
|
|
# GET WINE
|
2023-10-01 00:32:20 +00:00
|
|
|
RUN mkdir -pm755 /etc/apt/keyrings
|
|
|
|
|
RUN wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
|
|
|
|
|
RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources
|
|
|
|
|
RUN apt-get -y update && apt-get -y upgrade
|
2025-04-28 16:31:07 +00:00
|
|
|
RUN apt-get install --install-recommends wine-devel=8.16~bookworm-1 wine-devel-amd64=8.16~bookworm-1 wine-devel-i386=8.16~bookworm-1 winehq-devel=8.16~bookworm-1
|
2019-02-13 09:41:52 +00:00
|
|
|
|
2020-02-01 03:42:50 +00:00
|
|
|
# INSTALL GAMEMODE
|
|
|
|
|
#RUN add-apt-repository ppa:samoilov-lex/gamemode
|
|
|
|
|
#RUN apt-get -y update && apt-get -y install dbus-user-session gamemode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# BUILD WINE FROM SOURCE
|
|
|
|
|
#RUN apt-get -y remove winehq-devel
|
|
|
|
|
#RUN apt-get install -y flex bison gcc-multilib xserver-xorg-dev libgstreamer1.0-dev \
|
|
|
|
|
#libgstreamer-plugins-base1.0-dev libxcursor-dev libxi-dev libxxf86vm-dev libxrandr-dev libxfixes-dev \
|
|
|
|
|
#libxinerama-dev libxcomposite-dev libglu1-mesa-dev libosmesa6-dev opencl-headers libpcap-dev libdbus-1-dev \
|
|
|
|
|
#libncurses5-dev libsane-dev libv4l-dev libgphoto2-dev libpulse-dev libudev-dev libcups2-dev libfontconfig1-dev \
|
|
|
|
|
#libgsm1-dev libmpg123-dev libopenal-dev libldap2-dev libxrender-dev libopengl0 libxslt1-dev libgnutls28-dev \
|
|
|
|
|
#libjpeg-dev libva-dev xorg-dev libx11-dev libx11-dev:i386 libfreetype6-dev:i386 winbind gstreamer-1.0 \
|
|
|
|
|
#libgstreamer-plugins-base1.0-dev:i386
|
|
|
|
|
#RUN git clone git://source.winehq.org/git/wine.git ~/wine-dirs/wine-source
|
|
|
|
|
#RUN cd ~/wine-dirs/wine-source
|
|
|
|
|
#RUN sh ~/wine-dirs/wine-source/configure --prefix=/usr --libdir=/usr/lib --with-x --with-gstreamer --enable-win64
|
|
|
|
|
#RUN sh ~/wine-dirs/wine-source/configure --prefix=/usr --libdir=/usr/lib32 --with-x
|
2023-10-01 00:32:20 +00:00
|
|
|
#RUN make -j4
|
2020-02-01 03:42:50 +00:00
|
|
|
#RUN make install
|
|
|
|
|
|
|
|
|
|
|
2019-02-13 09:41:52 +00:00
|
|
|
# CLEAN IMAGE
|
|
|
|
|
RUN apt-get -y clean && apt-get -y autoremove
|
|
|
|
|
|
2020-01-08 07:49:43 +00:00
|
|
|
|
|
|
|
|
# ENV
|
|
|
|
|
# -- shutup installers
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
|
|
2019-02-13 09:41:52 +00:00
|
|
|
# USER
|
|
|
|
|
# -- add the user, expose datastore
|
|
|
|
|
RUN useradd -m -s /bin/bash -u ${SRVUID} ${SRVUSER}
|
|
|
|
|
# -- temporarily steal ownership
|
|
|
|
|
RUN chown -R root: /home/${SRVUSER}
|
2020-01-08 07:49:43 +00:00
|
|
|
# -- set wine win32 env
|
|
|
|
|
RUN WINEARCH=win32 WINEPREFIX=/home/gameserv/.wine32/ wine wineboot
|
2019-02-13 09:41:52 +00:00
|
|
|
|
|
|
|
|
# SCRIPT - installer
|
|
|
|
|
COPY _scripts/tribesnext-server-installer ${SRVDIR}
|
|
|
|
|
RUN chmod +x ${SRVDIR}/tribesnext-server-installer
|
|
|
|
|
RUN ${SRVDIR}/tribesnext-server-installer
|
|
|
|
|
|
|
|
|
|
|
2019-02-16 02:01:39 +00:00
|
|
|
# SCRIPT - server (default)
|
|
|
|
|
COPY _scripts/start-server ${INSTDIR}/start-server
|
|
|
|
|
RUN chmod +x ${INSTDIR}/start-server
|
2019-02-13 09:41:52 +00:00
|
|
|
|
2019-12-22 20:22:08 +00:00
|
|
|
|
2020-01-08 07:49:43 +00:00
|
|
|
# CLEAN UP TMP
|
2019-12-22 20:22:08 +00:00
|
|
|
COPY _scripts/clean-up ${SRVDIR}
|
|
|
|
|
RUN chmod +x ${SRVDIR}/clean-up
|
2020-01-08 07:49:43 +00:00
|
|
|
RUN ${SRVDIR}/clean-up
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TacoServer - Pull in resources from builder
|
|
|
|
|
COPY --from=tacobuilder /tmp/TacoServer/Classic/. ${INSTDIR}GameData/Classic/.
|
|
|
|
|
COPY --from=tacobuilder /tmp/TacoMaps/. ${INSTDIR}GameData/Classic/Maps/
|
2019-12-22 20:22:08 +00:00
|
|
|
|
2019-02-13 09:41:52 +00:00
|
|
|
|
2019-02-16 02:01:39 +00:00
|
|
|
# SCRIPT - custom (custom content / overrides)
|
|
|
|
|
COPY _custom/. ${INSTDIR}
|
2019-02-13 09:41:52 +00:00
|
|
|
|
|
|
|
|
|
2019-12-22 20:22:08 +00:00
|
|
|
# SCRIPT - expand admin prefs
|
|
|
|
|
COPY _scripts/cfg-admin-prefs ${SRVDIR}
|
|
|
|
|
RUN chmod +x ${SRVDIR}/cfg-admin-prefs
|
|
|
|
|
|
|
|
|
|
|
2019-02-13 09:41:52 +00:00
|
|
|
# PERMISSIONS
|
|
|
|
|
RUN chown -R ${SRVUSER}: /home/${SRVUSER}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# PORTS
|
|
|
|
|
EXPOSE \
|
|
|
|
|
# -- tribes
|
|
|
|
|
666/tcp \
|
2023-10-01 00:32:20 +00:00
|
|
|
28000/udp
|
2019-02-13 09:41:52 +00:00
|
|
|
|
2019-02-15 23:43:45 +00:00
|
|
|
USER ${SRVUSER}
|
2019-02-16 02:01:39 +00:00
|
|
|
WORKDIR ${INSTDIR}
|
2019-02-15 23:43:45 +00:00
|
|
|
|
|
|
|
|
CMD ["./start-server"]
|
2019-02-13 09:41:52 +00:00
|
|
|
|