Skip to content

Commit 9487f13

Browse files
committed
feat: add Ubuntu 24.04
1 parent 657453a commit 9487f13

File tree

5 files changed

+191
-11
lines changed

5 files changed

+191
-11
lines changed

.github/workflows/docker-publish.yml

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,50 @@ on:
1010
- cron: "0 2 * * 6"
1111

1212
jobs:
13+
build-ubuntu-2404:
14+
name: Build Ubuntu 24.04
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup QEMU
21+
uses: docker/setup-qemu-action@v3
22+
23+
- name: Setup Docker Buildx
24+
uses: docker/[email protected]
25+
26+
- name: Build
27+
run: docker build -t gameservermanagers/linuxgsm:ubuntu-24.04 -f ./Dockerfile.ubuntu-2404 .
28+
29+
- name: Login to DockerHub
30+
uses: docker/[email protected]
31+
with:
32+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
33+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
34+
35+
- name: Login to GitHub Container Registry
36+
uses: docker/[email protected]
37+
with:
38+
registry: ghcr.io
39+
username: ${{ github.actor }}
40+
password: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- name: Build and push (Ubuntu 24.04)
43+
uses: docker/[email protected]
44+
with:
45+
context: .
46+
file: ./Dockerfile.ubuntu-2404
47+
platforms: linux/amd64
48+
push: true
49+
tags: |
50+
gameservermanagers/linuxgsm:latest
51+
gameservermanagers/linuxgsm:ubuntu
52+
gameservermanagers/linuxgsm:ubuntu-24.04
53+
ghcr.io/gameservermanagers/linuxgsm:latest
54+
ghcr.io/gameservermanagers/linuxgsm:ubuntu
55+
ghcr.io/gameservermanagers/linuxgsm:ubuntu-24.04
56+
1357
build-ubuntu-2204:
1458
name: Build Ubuntu 22.04
1559
runs-on: ubuntu-latest
@@ -47,11 +91,7 @@ jobs:
4791
platforms: linux/amd64
4892
push: true
4993
tags: |
50-
gameservermanagers/linuxgsm:latest
51-
gameservermanagers/linuxgsm:ubuntu
5294
gameservermanagers/linuxgsm:ubuntu-22.04
53-
ghcr.io/gameservermanagers/linuxgsm:latest
54-
ghcr.io/gameservermanagers/linuxgsm:ubuntu
5595
ghcr.io/gameservermanagers/linuxgsm:ubuntu-22.04
5696
5797
build-ubuntu-2004:
@@ -96,7 +136,7 @@ jobs:
96136
97137
package-cleanup:
98138
name: Cleanup Old GitHub Packages
99-
needs: [ build-ubuntu-2004, build-ubuntu-2204 ]
139+
needs: [ build-ubuntu-2004, build-ubuntu-2204, build-ubuntu-2404 ]
100140
runs-on: ubuntu-latest
101141
steps:
102142
- name: Delete Package Versions

Dockerfile.ubuntu-2004

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ RUN echo "**** Install Base LinuxGSM Requirements ****" \
5151
lib32gcc-s1 \
5252
lib32stdc++6 \
5353
netcat \
54+
pigz \
5455
python3 \
5556
sudo \
5657
tar \
@@ -76,8 +77,7 @@ RUN echo "**** Install Node.js ****" \
7677
&& set -uex \
7778
&& mkdir -p /etc/apt/keyrings \
7879
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
79-
&& NODE_MAJOR=20 \
80-
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
80+
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20 nodistro main" > /etc/apt/sources.list.d/nodesource.list \
8181
&& apt-get update \
8282
&& apt-get install nodejs -y \
8383
&& apt-get -y autoremove \
@@ -89,7 +89,7 @@ RUN echo "**** Install Node.js ****" \
8989

9090
# Install GameDig https://docs.linuxgsm.com/requirements/gamedig
9191
RUN echo "**** Install GameDig ****" \
92-
&& npm install -g gamedig@4.3.1
92+
&& npm install -g gamedig@5.0.0-beta.2
9393
WORKDIR /app/lgsm \
9494
wget -N --no-check-certificate "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${LGSM_GITHUBBRANCH}/package.json" \
9595
&& npm install

Dockerfile.ubuntu-2204

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ RUN echo "**** Install Base LinuxGSM Requirements ****" \
5252
lib32gcc-s1 \
5353
lib32stdc++6 \
5454
netcat \
55+
pigz \
5556
python3 \
5657
sudo \
5758
tar \
@@ -77,8 +78,7 @@ RUN echo "**** Install Node.js ****" \
7778
&& set -uex \
7879
&& mkdir -p /etc/apt/keyrings \
7980
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
80-
&& NODE_MAJOR=20 \
81-
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
81+
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20 nodistro main" > /etc/apt/sources.list.d/nodesource.list \
8282
&& apt-get update \
8383
&& apt-get install nodejs -y \
8484
&& apt-get -y autoremove \
@@ -90,7 +90,7 @@ RUN echo "**** Install Node.js ****" \
9090

9191
# Install GameDig https://docs.linuxgsm.com/requirements/gamedig
9292
RUN echo "**** Install GameDig ****" \
93-
&& npm install -g gamedig@4.3.1
93+
&& npm install -g gamedig@5.0.0-beta.2
9494

9595
WORKDIR /app
9696

Dockerfile.ubuntu-2404

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
#
2+
# LinuxGSM Base Dockerfile
3+
#
4+
# https://github.com/GameServerManagers/docker-linuxgsm
5+
#
6+
7+
FROM gameservermanagers/steamcmd:ubuntu-24.04
8+
9+
LABEL maintainer="LinuxGSM <[email protected]>"
10+
ENV DEBIAN_FRONTEND noninteractive
11+
ENV TERM=xterm
12+
ENV LGSM_GITHUBUSER=GameServerManagers
13+
ENV LGSM_GITHUBREPO=LinuxGSM
14+
ENV LGSM_GITHUBBRANCH=master
15+
ENV LGSM_LOGDIR=/data/log
16+
ENV LGSM_SERVERFILES=/data/serverfiles
17+
ENV LGSM_DATADIR=/data/data
18+
ENV LGSM_CONFIG=/data/config-lgsm
19+
ENV LGSM_DEV=false
20+
ENV GAMESERVER=jc2server
21+
ENV UPDATE_CHECK=60
22+
ENV USER=linuxgsm
23+
ENV UID=1000
24+
ENV GID=1000
25+
26+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
27+
28+
## Install Base LinuxGSM Requirements
29+
RUN echo "**** Install Base LinuxGSM Requirements ****" \
30+
&& apt-get update \
31+
&& apt-get install -y software-properties-common \
32+
&& add-apt-repository multiverse \
33+
&& add-apt-repository ppa:git-core/ppa \
34+
&& apt-get update \
35+
&& apt-get install -y \
36+
bc \
37+
binutils \
38+
bsdmainutils \
39+
bzip2 \
40+
ca-certificates \
41+
cpio \
42+
cron \
43+
curl \
44+
distro-info \
45+
file \
46+
git \
47+
gnupg \
48+
gosu \
49+
gzip \
50+
hostname \
51+
jq \
52+
lib32gcc-s1 \
53+
lib32stdc++6 \
54+
netcat-openbsd \
55+
pigz \
56+
python3 \
57+
sudo \
58+
tar \
59+
tmux \
60+
unzip \
61+
util-linux \
62+
uuid-runtime \
63+
wget \
64+
xz-utils \
65+
# Docker Extras
66+
iproute2 \
67+
iputils-ping \
68+
nano \
69+
vim \
70+
&& apt-get -y autoremove \
71+
&& apt-get -y clean \
72+
&& rm -rf /var/lib/apt/lists/* \
73+
&& rm -rf /tmp/* \
74+
&& rm -rf /var/tmp/*
75+
76+
# Install Node.js
77+
RUN echo "**** Install Node.js ****" \
78+
&& set -uex \
79+
&& mkdir -p /etc/apt/keyrings \
80+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
81+
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20 nodistro main" > /etc/apt/sources.list.d/nodesource.list \
82+
&& apt-get update \
83+
&& apt-get install nodejs -y \
84+
&& apt-get -y autoremove \
85+
&& apt-get -y clean \
86+
&& rm -rf /var/lib/apt/lists/* \
87+
&& rm -rf /tmp/* \
88+
&& rm -rf /var/tmp/* \
89+
&& npm install -g npm@latest
90+
91+
# Install GameDig https://docs.linuxgsm.com/requirements/gamedig
92+
RUN echo "**** Install GameDig ****" \
93+
&& npm install -g [email protected]
94+
95+
WORKDIR /app
96+
97+
## Add linuxgsm user
98+
RUN echo "**** Add linuxgsm user ****" \
99+
&& mkdir /data \
100+
# Create the user
101+
&& groupadd --gid $GID $USER \
102+
&& useradd --uid $UID --gid $GID -m $USER \
103+
#
104+
# [Optional] Add sudo support. Omit if you don't need to install software after connecting.
105+
&& echo $USER ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USER \
106+
&& chmod 0440 /etc/sudoers.d/$USER \
107+
&& chown $USER:$USER /data
108+
109+
HEALTHCHECK --interval=1m --timeout=1m --start-period=2m --retries=1 CMD /app/entrypoint-healthcheck.sh || exit 1
110+
111+
## Download linuxgsm.sh
112+
RUN echo "**** Download linuxgsm.sh ****" \
113+
&& set -ex \
114+
&& curl -Lo linuxgsm.sh "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${LGSM_GITHUBBRANCH}/linuxgsm.sh" \
115+
&& chmod +x linuxgsm.sh
116+
117+
RUN echo "**** Get LinuxGSM Modules ****" \
118+
&& git clone --filter=blob:none --no-checkout --sparse https://github.com/GameServerManagers/LinuxGSM.git \
119+
&& cd LinuxGSM \
120+
&& git sparse-checkout set --cone \
121+
&& git sparse-checkout set lgsm/modules \
122+
&& git checkout ${LGSM_GITHUBBRANCH} \
123+
&& mkdir -p /app/lgsm/modules \
124+
&& mv lgsm/modules/* /app/lgsm/modules \
125+
&& chmod +x /app/lgsm/modules/* \
126+
&& cd ../ \
127+
&& rm -rf LinuxGSM \
128+
&& chown -R $USER:$USER /app
129+
130+
ARG CACHEBUST=1
131+
RUN echo "$CACHEBUST"
132+
133+
COPY entrypoint.sh /app/entrypoint.sh
134+
COPY entrypoint-user.sh /app/entrypoint-user.sh
135+
COPY entrypoint-healthcheck.sh /app/entrypoint-healthcheck.sh
136+
137+
RUN date > /build-time.txt
138+
139+
ENTRYPOINT ["/bin/bash", "./entrypoint.sh"]

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ LinuxGSM is a command-line tool for quick, simple deployment and management of L
1919
## Tags
2020

2121
- `latest`, `ubuntu` - Latest Ubuntu LTS release
22+
- `ubuntu-24.04` - Ubuntu 24.04 LTS 'Noble Numbat'
2223
- `ubuntu-22.04` - Ubuntu 22.04 LTS 'Jammy Jackalope'
2324
- `ubuntu-20.04` - Ubuntu 20.04 LTS 'Focal Fossa'

0 commit comments

Comments
 (0)