„Dockerfile“ ändern

This commit is contained in:
2020-01-19 18:54:55 +01:00
parent 5df0849a65
commit 6b48f85d95

View File

@@ -1,10 +1,11 @@
FROM ubuntu FROM ich777/debian-baseimage
MAINTAINER ich777 LABEL maintainer="admin@minenet.at"
RUN dpkg --add-architecture i386 RUN dpkg --add-architecture i386 && \
RUN apt-get update apt-get update && \
RUN apt-get -y install wget lib32gcc1 lib32stdc++6 mariadb-server screen unzip libtbb2:i386 apt-get -y install --no-install-recommends lib32gcc1 lib32stdc++6 mariadb-server screen unzip libtbb2:i386 && \
rm -rf /var/lib/apt/lists/*
ENV DATA_DIR="/serverdata" ENV DATA_DIR="/serverdata"
ENV STEAMCMD_DIR="${DATA_DIR}/steamcmd" ENV STEAMCMD_DIR="${DATA_DIR}/steamcmd"
@@ -23,32 +24,30 @@ ENV GID=100
ENV USERNAME="" ENV USERNAME=""
ENV PASSWRD="" ENV PASSWRD=""
RUN mkdir $DATA_DIR RUN mkdir $DATA_DIR && \
RUN mkdir $STEAMCMD_DIR mkdir $STEAMCMD_DIR && \
RUN mkdir $SERVER_DIR mkdir $SERVER_DIR && \
RUN useradd -d $DATA_DIR -s /bin/bash --uid $UID --gid $GID steam useradd -d $DATA_DIR -s /bin/bash --uid $UID --gid $GID steam && \
RUN chown -R steam $DATA_DIR chown -R steam $DATA_DIR && \
RUN mkdir -p $DATA_DIR/".local/share/Arma 3" && mkdir -p $DATA_DIR/".local/share/Arma 3 - Other Profiles" mkdir -p $DATA_DIR/".local/share/Arma 3" && mkdir -p $DATA_DIR/".local/share/Arma 3 - Other Profiles" && \
ulimit -n 2048 && \
RUN ulimit -n 2048 /etc/init.d/mysql start && \
RUN /etc/init.d/mysql start && \
mysql -u root -e "CREATE USER IF NOT EXISTS 'steam'@'%' IDENTIFIED BY 'exile';FLUSH PRIVILEGES;" && \ mysql -u root -e "CREATE USER IF NOT EXISTS 'steam'@'%' IDENTIFIED BY 'exile';FLUSH PRIVILEGES;" && \
mysql -u root -e "CREATE DATABASE IF NOT EXISTS exile;" && \ mysql -u root -e "CREATE DATABASE IF NOT EXISTS exile;" && \
mysql -u root -e "GRANT ALL ON exile.* TO 'steam'@'%' IDENTIFIED BY 'exile';" && \ mysql -u root -e "GRANT ALL ON exile.* TO 'steam'@'%' IDENTIFIED BY 'exile';" && \
mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '$MARIA_DB_ROOT_PWD';FLUSH PRIVILEGES;" mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '$MARIA_DB_ROOT_PWD';FLUSH PRIVILEGES;" && \
RUN sed -i '$a\[mysqld]\nsql-mode="ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_AUTO_CREATE_USER"' /etc/alternatives/my.cnf sed -i '$a\[mysqld]\nsql-mode="ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_AUTO_CREATE_USER"' /etc/alternatives/my.cnf
ADD /scripts/ /opt/scripts/ ADD /scripts/ /opt/scripts/
RUN chmod -R 770 /opt/scripts/ RUN chmod -R 770 /opt/scripts/ && \
RUN chmod -R 770 $DATA_DIR/".local/share/Arma 3" && chmod -R 770 $DATA_DIR/".local/share/Arma 3 - Other Profiles" chmod -R 770 $DATA_DIR/".local/share/Arma 3" && chmod -R 770 $DATA_DIR/".local/share/Arma 3 - Other Profiles" && \
RUN chown -R steam /opt/scripts && chown -R steam $DATA_DIR/.local chown -R steam /opt/scripts && chown -R steam $DATA_DIR/.local && \
RUN chown -R steam:users /var/lib/mysql chown -R steam:users /var/lib/mysql && \
RUN chmod -R 770 /var/lib/mysql chmod -R 770 /var/lib/mysql && \
RUN chown -R steam:users /var/run/mysqld chown -R steam:users /var/run/mysqld && \
RUN chmod -R 770 /var/run/mysqld chmod -R 770 /var/run/mysqld
USER steam USER steam
#Server Start #Server Start
ENTRYPOINT ["/opt/scripts/start-server.sh"] ENTRYPOINT ["/opt/scripts/start-server.sh"]