Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Commit

Permalink
Update Paths
Browse files Browse the repository at this point in the history
w


lf
  • Loading branch information
dgibbs64 committed Feb 9, 2022
1 parent 90c7611 commit e3e17f1
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 134 deletions.
254 changes: 127 additions & 127 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,127 +1,127 @@
#
# LinuxGSM Base Dockerfile
#
# https://github.com/GameServerManagers/LinuxGSM-Docker
#

FROM ubuntu:20.04

LABEL maintainer="LinuxGSM <me@danielgibbs.co.uk>"

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 \
cpio \
curl \
distro-info \
file \
gzip \
hostname \
jq \
lib32gcc1 \
lib32stdc++6 \
netcat \
python3 \
tar \
tmux \
unzip \
util-linux \
wget \
xz-utils \
# Docker Extras
cron \
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 libsdl2-2.0-0:i386 steamcmd \
&& ln -s /usr/games/steamcmd /usr/bin/steamcmd

# 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

## Add linuxgsm user
RUN echo "**** Add linuxgsm user ****" \
# Create the user
&& groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
#
# [Optional] Add sudo support. Omit if you don't need to install software after connecting.
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME \
&& chown $USERNAME:$USERNAME /home/$USERNAME

# Create /opt/linuxgsm
#RUN echo "**** Create /opt/linuxgsm ****" \
# && mkdir -p /opt/linuxgsm \
# && chown linuxgsm:linuxgsm /opt/linuxgsm

## Download linuxgsm.sh
RUN echo "**** Download linuxgsm.sh ****" \
&& set -ex \
&& wget -O linuxgsm.sh https://linuxgsm.sh \
&& chmod +x /linuxgsm.sh

WORKDIR /home/linuxgsm
ENV PATH=$PATH:/home/linuxgsm
USER linuxgsm

COPY entrypoint.sh /home/linuxgsm/entrypoint.sh

ENTRYPOINT [ "/usr/bin/tini", "--" ]
CMD [ "bash","./entrypoint.sh" ]
#
# LinuxGSM Base Dockerfile
#
# https://github.com/GameServerManagers/LinuxGSM-Docker
#

FROM ubuntu:20.04

LABEL maintainer="LinuxGSM <me@danielgibbs.co.uk>"

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 \
cpio \
curl \
distro-info \
file \
gzip \
hostname \
jq \
lib32gcc1 \
lib32stdc++6 \
netcat \
python3 \
tar \
tmux \
unzip \
util-linux \
wget \
xz-utils \
# Docker Extras
cron \
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 libsdl2-2.0-0:i386 steamcmd \
&& ln -s /usr/games/steamcmd /usr/bin/steamcmd

# 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

## Add linuxgsm user
RUN echo "**** Add linuxgsm user ****" \
# Create the user
&& groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
#
# [Optional] Add sudo support. Omit if you don't need to install software after connecting.
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME \
&& chown $USERNAME:$USERNAME /home/$USERNAME

# Create /opt/linuxgsm
#RUN echo "**** Create /opt/linuxgsm ****" \
# && mkdir -p /opt/linuxgsm \
# && chown linuxgsm:linuxgsm /opt/linuxgsm

## Download linuxgsm.sh
RUN echo "**** Download linuxgsm.sh ****" \
&& set -ex \
&& wget -O linuxgsm.sh https://linuxgsm.sh \
&& chmod +x /linuxgsm.sh

WORKDIR /home/linuxgsm
ENV PATH=$PATH:/home/linuxgsm
USER linuxgsm

COPY entrypoint.sh /home/linuxgsm/entrypoint.sh

ENTRYPOINT [ "/usr/bin/tini", "--" ]
CMD [ "bash","./entrypoint.sh" ]
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ services:
- LGSM_GITHUBREPO=LinuxGSM
- LGSM_GITHUBBRANCH=master
volumes:
- /home/linuxgsm/serverfiles:/home/linuxgsm/serverfiles
- /home/linuxgsm/serverfiles:/home/linuxgsm/log
- /home/linuxgsm/serverfiles:/home/linuxgsm/lgsm/config-lgsm
- /path/to/serverfiles:/home/linuxgsm/serverfiles
- /path/to/log:/home/linuxgsm/log
- /path/to/config-lgsm:/home/linuxgsm/lgsm/config-lgsm
ports:
- "27015:27015/tcp"
- "27015:27015/udp"
Expand All @@ -54,4 +54,5 @@ Commands can be run just like standard LinuxGSM using the docker exec command.
docker exec -it csgoserver ./csgoserver details
```
```
#
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ services:
- LGSM_GITHUBREPO=LinuxGSM
- LGSM_GITHUBBRANCH=master
volumes:
- /home/linuxgsm/serverfiles:/home/linuxgsm/serverfiles
- /home/linuxgsm/serverfiles:/home/linuxgsm/log
- /home/linuxgsm/serverfiles:/home/linuxgsm/lgsm/config-lgsm
- /path/to/serverfiles:/home/linuxgsm/serverfiles
- /path/to/log:/home/linuxgsm/log
- /path/to/config-lgsm:/home/linuxgsm/lgsm/config-lgsm
ports:
- "27015:27015/tcp"
- "27015:27015/udp"
Expand Down

0 comments on commit e3e17f1

Please sign in to comment.