5 changed files with 283 additions and 1 deletions
@ -7,7 +7,7 @@ on: |
|||||
- cron: "0 23 * * *" |
- cron: "0 23 * * *" |
||||
|
|
||||
jobs: |
jobs: |
||||
docker: |
ubuntu-2204: |
||||
runs-on: ubuntu-latest |
runs-on: ubuntu-latest |
||||
steps: |
steps: |
||||
- name: Checkout |
- name: Checkout |
||||
@ -31,6 +31,7 @@ jobs: |
|||||
uses: docker/[email protected] |
uses: docker/[email protected] |
||||
with: |
with: |
||||
context: . |
context: . |
||||
|
file: ./Dockerfile.ubuntu-2204 |
||||
platforms: linux/amd64 |
platforms: linux/amd64 |
||||
push: true |
push: true |
||||
tags: | |
tags: | |
||||
@ -38,3 +39,65 @@ jobs: |
|||||
gameservermanagers/linuxgsm:ubuntu-22.04 |
gameservermanagers/linuxgsm:ubuntu-22.04 |
||||
ghcr.io/gameservermanagers/linuxgsm:latest |
ghcr.io/gameservermanagers/linuxgsm:latest |
||||
ghcr.io/gameservermanagers/linuxgsm:ubuntu-22.04 |
ghcr.io/gameservermanagers/linuxgsm:ubuntu-22.04 |
||||
|
|
||||
|
ubuntu-2004: |
||||
|
runs-on: ubuntu-latest |
||||
|
steps: |
||||
|
- name: Checkout |
||||
|
uses: actions/checkout@v3 |
||||
|
- name: Set up QEMU |
||||
|
uses: docker/setup-qemu-action@v2 |
||||
|
- name: Set up Docker Buildx |
||||
|
uses: docker/[email protected] |
||||
|
- name: Login to DockerHub |
||||
|
uses: docker/[email protected] |
||||
|
with: |
||||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }} |
||||
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} |
||||
|
- name: Login to GitHub Container Registry |
||||
|
uses: docker/[email protected] |
||||
|
with: |
||||
|
registry: ghcr.io |
||||
|
username: ${{ github.actor }} |
||||
|
password: ${{ secrets.GITHUB_TOKEN }} |
||||
|
- name: Build and push (Ubuntu 20.04) |
||||
|
uses: docker/[email protected] |
||||
|
with: |
||||
|
context: . |
||||
|
file: ./Dockerfile.ubuntu-2004 |
||||
|
platforms: linux/amd64 |
||||
|
push: true |
||||
|
tags: | |
||||
|
gameservermanagers/linuxgsm:ubuntu-20.04 |
||||
|
ghcr.io/gameservermanagers/linuxgsm:ubuntu-20.04 |
||||
|
|
||||
|
ubuntu-1804: |
||||
|
runs-on: ubuntu-latest |
||||
|
steps: |
||||
|
- name: Checkout |
||||
|
uses: actions/checkout@v3 |
||||
|
- name: Set up QEMU |
||||
|
uses: docker/setup-qemu-action@v2 |
||||
|
- name: Set up Docker Buildx |
||||
|
uses: docker/[email protected] |
||||
|
- name: Login to DockerHub |
||||
|
uses: docker/[email protected] |
||||
|
with: |
||||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }} |
||||
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} |
||||
|
- name: Login to GitHub Container Registry |
||||
|
uses: docker/[email protected] |
||||
|
with: |
||||
|
registry: ghcr.io |
||||
|
username: ${{ github.actor }} |
||||
|
password: ${{ secrets.GITHUB_TOKEN }} |
||||
|
- name: Build and push (Ubuntu 18.04) |
||||
|
uses: docker/[email protected] |
||||
|
with: |
||||
|
context: . |
||||
|
file: ./Dockerfile.ubuntu-1804 |
||||
|
platforms: linux/amd64 |
||||
|
push: true |
||||
|
tags: | |
||||
|
gameservermanagers/linuxgsm:ubuntu-18.04 |
||||
|
ghcr.io/gameservermanagers/linuxgsm:ubuntu-18.04 |
||||
|
@ -0,0 +1,104 @@ |
|||||
|
# |
||||
|
# LinuxGSM Base Dockerfile |
||||
|
# |
||||
|
# https://github.com/GameServerManagers/docker-linuxgsm |
||||
|
# |
||||
|
|
||||
|
FROM gameservermanagers/steamcmd:ubuntu-18.04 |
||||
|
|
||||
|
LABEL maintainer="LinuxGSM <[email protected]>" |
||||
|
|
||||
|
ENV DEBIAN_FRONTEND noninteractive |
||||
|
ENV TERM=xterm |
||||
|
ENV LGSM_GITHUBUSER=GameServerManagers |
||||
|
ENV LGSM_GITHUBREPO=LinuxGSM |
||||
|
ENV LGSM_GITHUBBRANCH=develop |
||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"] |
||||
|
|
||||
|
## 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 \ |
||||
|
cron \ |
||||
|
bc \ |
||||
|
binutils \ |
||||
|
bsdmainutils \ |
||||
|
bzip2 \ |
||||
|
ca-certificates \ |
||||
|
cpio \ |
||||
|
curl \ |
||||
|
distro-info \ |
||||
|
file \ |
||||
|
git \ |
||||
|
gzip \ |
||||
|
hostname \ |
||||
|
jq \ |
||||
|
lib32gcc-s1 \ |
||||
|
lib32stdc++6 \ |
||||
|
netcat \ |
||||
|
python3 \ |
||||
|
sudo \ |
||||
|
tar \ |
||||
|
tini \ |
||||
|
tmux \ |
||||
|
unzip \ |
||||
|
util-linux \ |
||||
|
wget \ |
||||
|
xz-utils \ |
||||
|
# Docker Extras |
||||
|
iproute2 \ |
||||
|
iputils-ping \ |
||||
|
nano \ |
||||
|
vim \ |
||||
|
&& apt-get -y autoremove \ |
||||
|
&& apt-get -y clean \ |
||||
|
&& rm -rf /var/lib/apt/lists/* \ |
||||
|
&& rm -rf /tmp/* \ |
||||
|
&& rm -rf /var/tmp/* |
||||
|
|
||||
|
# Install Node.js |
||||
|
RUN echo "**** Install Node.js ****" \ |
||||
|
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \ |
||||
|
&& apt-get update \ |
||||
|
&& apt-get install -y nodejs \ |
||||
|
&& apt-get -y autoremove \ |
||||
|
&& apt-get -y clean \ |
||||
|
&& rm -rf /var/lib/apt/lists/* \ |
||||
|
&& rm -rf /tmp/* \ |
||||
|
&& rm -rf /var/tmp/* |
||||
|
|
||||
|
# Install GameDig https://docs.linuxgsm.com/requirements/gamedig |
||||
|
RUN echo "**** Install GameDig ****" \ |
||||
|
&& npm install -g gamedig |
||||
|
|
||||
|
WORKDIR /linuxgsm |
||||
|
|
||||
|
## Download linuxgsm.sh |
||||
|
RUN echo "**** Download linuxgsm.sh ****" \ |
||||
|
&& set -ex \ |
||||
|
&& mkdir -p /linuxgsm/lgsm \ |
||||
|
&& wget -O linuxgsm.sh "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${LGSM_GITHUBBRANCH}/linuxgsm.sh" \ |
||||
|
&& chmod +x linuxgsm.sh |
||||
|
|
||||
|
RUN echo "**** Get LinuxGSM Modules ****" \ |
||||
|
&& git clone --filter=blob:none --no-checkout --sparse https://github.com/GameServerManagers/LinuxGSM.git \ |
||||
|
&& cd LinuxGSM \ |
||||
|
&& git sparse-checkout set --cone \ |
||||
|
&& git sparse-checkout set lgsm/functions \ |
||||
|
&& git checkout ${LGSM_GITHUBBRANCH} \ |
||||
|
&& mkdir -p /linuxgsm/lgsm/functions \ |
||||
|
&& mv lgsm/functions/* /linuxgsm/lgsm/functions \ |
||||
|
&& chmod +x /linuxgsm/lgsm/functions/* \ |
||||
|
&& rm -rf /linuxgsm/LinuxGSM |
||||
|
|
||||
|
# Add LinuxGSM cronjobs |
||||
|
RUN echo "**** Create Cronjobs ****" |
||||
|
RUN (crontab -l 2>/dev/null; echo "*/1 * * * * /linuxgsm/*server monitor > /dev/null 2>&1") | crontab - |
||||
|
RUN (crontab -l 2>/dev/null; echo "*/30 * * * * /linuxgsm/*server update > /dev/null 2>&1") | crontab - |
||||
|
|
||||
|
RUN rm -f /linuxgsm/entrypoint.sh |
||||
|
COPY entrypoint.sh /linuxgsm/entrypoint.sh |
||||
|
RUN date > /time.txt |
@ -0,0 +1,104 @@ |
|||||
|
# |
||||
|
# LinuxGSM Base Dockerfile |
||||
|
# |
||||
|
# https://github.com/GameServerManagers/docker-linuxgsm |
||||
|
# |
||||
|
|
||||
|
FROM gameservermanagers/steamcmd:ubuntu-20.04 |
||||
|
|
||||
|
LABEL maintainer="LinuxGSM <[email protected]>" |
||||
|
|
||||
|
ENV DEBIAN_FRONTEND noninteractive |
||||
|
ENV TERM=xterm |
||||
|
ENV LGSM_GITHUBUSER=GameServerManagers |
||||
|
ENV LGSM_GITHUBREPO=LinuxGSM |
||||
|
ENV LGSM_GITHUBBRANCH=develop |
||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"] |
||||
|
|
||||
|
## 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 \ |
||||
|
cron \ |
||||
|
bc \ |
||||
|
binutils \ |
||||
|
bsdmainutils \ |
||||
|
bzip2 \ |
||||
|
ca-certificates \ |
||||
|
cpio \ |
||||
|
curl \ |
||||
|
distro-info \ |
||||
|
file \ |
||||
|
git \ |
||||
|
gzip \ |
||||
|
hostname \ |
||||
|
jq \ |
||||
|
lib32gcc-s1 \ |
||||
|
lib32stdc++6 \ |
||||
|
netcat \ |
||||
|
python3 \ |
||||
|
sudo \ |
||||
|
tar \ |
||||
|
tini \ |
||||
|
tmux \ |
||||
|
unzip \ |
||||
|
util-linux \ |
||||
|
wget \ |
||||
|
xz-utils \ |
||||
|
# Docker Extras |
||||
|
iproute2 \ |
||||
|
iputils-ping \ |
||||
|
nano \ |
||||
|
vim \ |
||||
|
&& apt-get -y autoremove \ |
||||
|
&& apt-get -y clean \ |
||||
|
&& rm -rf /var/lib/apt/lists/* \ |
||||
|
&& rm -rf /tmp/* \ |
||||
|
&& rm -rf /var/tmp/* |
||||
|
|
||||
|
# Install Node.js |
||||
|
RUN echo "**** Install Node.js ****" \ |
||||
|
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \ |
||||
|
&& apt-get update \ |
||||
|
&& apt-get install -y nodejs \ |
||||
|
&& apt-get -y autoremove \ |
||||
|
&& apt-get -y clean \ |
||||
|
&& rm -rf /var/lib/apt/lists/* \ |
||||
|
&& rm -rf /tmp/* \ |
||||
|
&& rm -rf /var/tmp/* |
||||
|
|
||||
|
# Install GameDig https://docs.linuxgsm.com/requirements/gamedig |
||||
|
RUN echo "**** Install GameDig ****" \ |
||||
|
&& npm install -g gamedig |
||||
|
|
||||
|
WORKDIR /linuxgsm |
||||
|
|
||||
|
## Download linuxgsm.sh |
||||
|
RUN echo "**** Download linuxgsm.sh ****" \ |
||||
|
&& set -ex \ |
||||
|
&& mkdir -p /linuxgsm/lgsm \ |
||||
|
&& wget -O linuxgsm.sh "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${LGSM_GITHUBBRANCH}/linuxgsm.sh" \ |
||||
|
&& chmod +x linuxgsm.sh |
||||
|
|
||||
|
RUN echo "**** Get LinuxGSM Modules ****" \ |
||||
|
&& git clone --filter=blob:none --no-checkout --sparse https://github.com/GameServerManagers/LinuxGSM.git \ |
||||
|
&& cd LinuxGSM \ |
||||
|
&& git sparse-checkout set --cone \ |
||||
|
&& git sparse-checkout set lgsm/functions \ |
||||
|
&& git checkout ${LGSM_GITHUBBRANCH} \ |
||||
|
&& mkdir -p /linuxgsm/lgsm/functions \ |
||||
|
&& mv lgsm/functions/* /linuxgsm/lgsm/functions \ |
||||
|
&& chmod +x /linuxgsm/lgsm/functions/* \ |
||||
|
&& rm -rf /linuxgsm/LinuxGSM |
||||
|
|
||||
|
# Add LinuxGSM cronjobs |
||||
|
RUN echo "**** Create Cronjobs ****" |
||||
|
RUN (crontab -l 2>/dev/null; echo "*/1 * * * * /linuxgsm/*server monitor > /dev/null 2>&1") | crontab - |
||||
|
RUN (crontab -l 2>/dev/null; echo "*/30 * * * * /linuxgsm/*server update > /dev/null 2>&1") | crontab - |
||||
|
|
||||
|
RUN rm -f /linuxgsm/entrypoint.sh |
||||
|
COPY entrypoint.sh /linuxgsm/entrypoint.sh |
||||
|
RUN date > /time.txt |
Loading…
Reference in new issue