Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions azure/push-and-run-docker-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ az container create \
--image $CONTAINER_REGISTRY.azurecr.io/$DOCKER_CONTAINER:$DOCKER_CONTAINER_TAG \
--registry-username $CONTAINER_REGISTRY \
--registry-password $CONTAINER_REGISTRY_KEY \
--cpu 4 \
--memory 2 \
--cpu 1 \
--memory 4 \
--protocol UDP \
--azure-file-volume-account-name $STORAGE_ACCOUNT \
--azure-file-volume-account-key $STORAGE_ACCOUNT_KEY \
Expand Down
152 changes: 84 additions & 68 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,80 +1,108 @@
FROM ubuntu:18.04
#
# LinuxGSM Base Dockerfile
#
# https://github.com/GameServerManagers/LinuxGSM-Docker
#

ENV DEBIAN_FRONTEND noninteractive

# Install base dependencies

RUN set -ex; \
apt-get update -y; \
apt-get install -q -y locales; \
rm -rf /var/lib/apt/lists/*; \
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
FROM ubuntu:20.04

ENV LANG en_US.utf8
LABEL maintainer="LinuxGSM <me@danielgibbs.co.uk>"

RUN set -ex; \
dpkg --add-architecture i386; \
apt-get update -y; \
apt-get install -y \
vim \
apt-transport-https \
ENV DEBIAN_FRONTEND noninteractive
ENV TERM=xterm
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Install UTF-8 unicode
RUN echo "**** Install UTF-8 ****" \
&& apt-get update \
&& apt-get install -y locales apt-utils debconf-utils
RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8

## Upgrade Ubuntu
RUN echo "**** apt upgrade ****" \
&& apt-get update; \
apt-get upgrade -y

## Install Base LinuxGSM Requirements
RUN echo "**** Install Base LinuxGSM Requirements ****" \
&& apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository multiverse \
&& apt-get update \
&& apt-get install -y \
bc \
binutils \
bsdmainutils \
bzip2 \
ca-certificates \
cron \
cpio \
curl \
default-jre \
expect \
distro-info \
file \
gzip \
iproute2 \
hostname \
jq \
lib32gcc1 \
lib32stdc++6 \
lib32tinfo5 \
lib32z1 \
libcurl4-gnutls-dev:i386 \
libdbus-glib-1-2:i386 \
libglu1-mesa:i386 \
libldap-2.4-2:i386 \
libncurses5:i386 \
libnm-glib-dev:i386 \
libnm-glib4:i386 \
libopenal1:i386 \
libpulse0:i386 \
libsdl1.2debian \
libsdl2-2.0-0:i386 \
libssl1.0.0:i386 \
libstdc++5:i386 \
libstdc++6 \
libstdc++6:i386 \
libtbb2 \
libtcmalloc-minimal4:i386 \
libusb-1.0-0:i386 \
libxrandr2:i386 \
libxtst6:i386 \
mailutils \
netcat \
postfix \
python \
speex:i386 \
python3 \
tar \
telnet \
tmux \
unzip \
util-linux \
wget \
xz-utils \
zlib1g \
zlib1g:i386 \
# Docker Extras
cron \
gosu; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*
iproute2 \
iputils-ping \
nano \
vim \
sudo \
tini

# Install SteamCMD
RUN echo "**** Install SteamCMD ****" \
&& echo steam steam/question select "I AGREE" | debconf-set-selections \
&& echo steam steam/license note '' | debconf-set-selections \
&& dpkg --add-architecture i386 \
&& apt-get update -y \
&& apt-get install -y --no-install-recommends \
libatomic1 \
libpulse0 \
libpulse-dev \
libc6-dev \
libsdl2-2.0-0:i386 \
steamcmd \
&& ln -s /usr/games/steamcmd /usr/bin/steamcmd

# Install linuxgsm
# Install NodeJS
RUN echo "**** Install NodeJS ****" \
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get update && apt-get install -y nodejs

# Install GameDig https://docs.linuxgsm.com/requirements/gamedig
RUN echo "**** Install GameDig ****" \
&& npm install -g gamedig

# Install Cleanup
RUN echo "**** Cleanup ****" \
&& apt-get -y autoremove \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* \
&& rm -rf /var/tmp/*

##Need use xterm for LinuxGSM##

ENV DEBIAN_FRONTEND noninteractive

ARG USERNAME=linuxgsm
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Install linuxgsm
RUN wget https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/linuxgsm.sh

RUN set -ex; \
Expand All @@ -94,27 +122,15 @@ WORKDIR /home/linuxgsm
ENV TERM=xterm
ENV PATH=$PATH:/home/linuxgsm

# Install steamcmd

USER root

RUN echo steam steam/question select "I AGREE" | debconf-set-selections; \
echo steam steam/license note '' | debconf-set-selections; \
dpkg --add-architecture i386; \
apt-get update -y; \
apt-get install -q -y --no-install-recommends steamcmd; \
ln -sf /usr/games/steamcmd /usr/bin/steamcmd; \
apt-get autoremove -q -y; \
rm -rf /var/lib/apt/lists/*;

# Install vhserver

USER root
COPY ./vhserverstart.sh .
RUN chmod +x vhserverstart.sh;
RUN chmod +x vhserverstart.sh;

USER linuxgsm

RUN echo 109 | ./linuxgsm.sh install; \
RUN echo 121 | ./linuxgsm.sh install; \
printf "Y\nY\nY\n" | vhserver install; \
mkdir valheimgameserverbackup;

Expand Down