diff --git a/azure/push-and-run-docker-container.sh b/azure/push-and-run-docker-container.sh index dc7c0d7..fe4b472 100755 --- a/azure/push-and-run-docker-container.sh +++ b/azure/push-and-run-docker-container.sh @@ -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 \ diff --git a/docker/Dockerfile b/docker/Dockerfile index a84314e..822b4c0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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 " -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; \ @@ -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;