Battlelore version merge

Prefered version
This commit is contained in:
ChocoTaco 2019-12-22 15:22:08 -05:00
parent 09eb245515
commit 881c922b99
14 changed files with 385 additions and 69 deletions

View file

@ -1,51 +1,79 @@
FROM i386/ubuntu:latest
MAINTAINER sairuk battlelore chocotaco
# 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
RUN git clone --depth 1 "https://github.com/ChocoTaco1/TacoServer/" && cd ./TacoServer
WORKDIR /tmp
RUN git clone --depth 1 "https://github.com/ChocoTaco1/TacoMaps/" && cd ./TacoMaps
WORKDIR /tmp
RUN git clone --depth 1 "https://github.com/ChocoTaco1/NoTNscripts/" && cd ./NoTNscripts
# Main Game Server Image
FROM ubuntu:18.04
LABEL maintainer="sairuk, battlelore, chocotaco"
# ENVIRONMENT
ARG SRVUSER=gameserv
ARG SRVUID=1000
ARG SRVDIR=/tmp/tribes2/
ENV INSTDIR=/home/${SRVUSER}/.wine/drive_c/Dynamix/Tribes2/
ENV INSTDIR=/home/${SRVUSER}/.wine32/drive_c/Dynamix/Tribes2/
# 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
# UPDATE IMAGE
RUN apt-get -y update
RUN apt-get -y upgrade
RUN dpkg --add-architecture i386
RUN apt-get -y update --fix-missing && apt-get -y upgrade
# DEPENDENCIES
RUN dpkg --add-architecture i386
RUN apt-get -y install \
# -- access
sudo unzip \
# -- logging
rsyslog \
# -- utilities
sed less vim file nano wget \
sed less nano vim file wget gnupg2 software-properties-common netcat \
# --- wine
${WINEVER} \
#${WINEVER} \
# -- display
xvfb \
# -- git clone
git-core
xvfb
RUN wget --no-check-certificate https://dl.winehq.org/wine-builds/winehq.key
RUN apt-key add winehq.key
RUN add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
RUN add-apt-repository ppa:cybermax-dexter/sdl2-backport
RUN apt-get -y update && apt-get -y upgrade && apt-get -y install --install-recommends winehq-devel
# CLEAN IMAGE
RUN apt-get -y clean && apt-get -y autoremove
# ENV
# -- shutup installers
ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND noninteractive
# USER
# -- add the user, expose datastore
RUN useradd -m -s /bin/bash -u ${SRVUID} ${SRVUSER}
# -- temporarily steal ownership
RUN chown -R root: /home/${SRVUSER}
# -- set wine win32 env
RUN WINEARCH=win32 WINEPREFIX=/home/gameserv/.wine32/ wine wineboot
# SCRIPT - installer
COPY _scripts/tribesnext-server-installer ${SRVDIR}
@ -57,11 +85,27 @@ RUN ${SRVDIR}/tribesnext-server-installer
COPY _scripts/start-server ${INSTDIR}/start-server
RUN chmod +x ${INSTDIR}/start-server
# TacoServer - Pull in resources from builder
COPY --from=tacobuilder /tmp/TacoServer/Classic/. ${INSTDIR}GameData/Classic/.
COPY --from=tacobuilder /tmp/TacoMaps/. ${INSTDIR}GameData/Classic/Maps/
COPY --from=tacobuilder /tmp/NoTNscripts/. ${INSTDIR}GameData/Classic/scripts/autoexec/.
# CLEAN UP
COPY _scripts/clean-up ${SRVDIR}
RUN chmod +x ${SRVDIR}/clean-up
RUN ${SRVDIR}/clean-up ${INSTDIR}
# SCRIPT - custom (custom content / overrides)
COPY _custom/. ${INSTDIR}
# SCRIPT - expand admin prefs
COPY _scripts/cfg-admin-prefs ${SRVDIR}
RUN chmod +x ${SRVDIR}/cfg-admin-prefs
# PERMISSIONS
RUN chown -R ${SRVUSER}: /home/${SRVUSER}