This commit is contained in:
28
.gitea/workflows/build.yml
Normal file
28
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'Dockerfile'
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Login to Docker Registry
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ms -u --password-stdin
|
||||
|
||||
- name: Build and push Docker image
|
||||
run: |
|
||||
IMAGE_NAME=registry.msws.xyz/steamcmd:lastest
|
||||
docker build -t $IMAGE_NAME .
|
||||
docker push $IMAGE_NAME
|
||||
env:
|
||||
DOCKER_BUILDKIT: 1 # Enable buildkit for faster builds
|
||||
83
Dockerfile
Normal file
83
Dockerfile
Normal file
@@ -0,0 +1,83 @@
|
||||
FROM debian:bookworm-slim as builder
|
||||
|
||||
ADD https://repo.steampowered.com/steamrt-images-scout/snapshots/latest-steam-client-general-availability/com.valvesoftware.SteamRuntime.Platform-amd64%2Ci386-scout-runtime.tar.gz /steam-runtime.tar.xz
|
||||
|
||||
RUN set -exu ; \
|
||||
dpkg --add-architecture i386 ; \
|
||||
apt-get -yq update ; \
|
||||
apt-get -yq --no-install-recommends --no-install-suggests install \
|
||||
ca-certificates \
|
||||
curl \
|
||||
lib32gcc-s1 \
|
||||
lib32stdc++6 \
|
||||
lib32z1 \
|
||||
libc6-i386 \
|
||||
libgdiplus \
|
||||
libncurses5:i386 \
|
||||
xz-utils \
|
||||
libtinfo5:i386 \
|
||||
libicu-dev
|
||||
|
||||
# Valve Steam Runtime for Linux
|
||||
# https://gitlab.steamos.cloud/steamrt/steamrt/-/tree/steamrt/scout/
|
||||
RUN set -exu ; \
|
||||
mkdir /valve-runtime ; \
|
||||
tar xf /steam-runtime.tar.xz ; \
|
||||
#CS2 deps (libcurl & children)
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libcurl*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libidn*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libgssapi_krb5*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libgnutls*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/librtmp*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libkrb5*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libk5crypto*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libp11-kit*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libtasn1*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libnettle*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libhogweed*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libgmp*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libffi*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libuuid*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libcom_err*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libgpg-error*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libkeyutils*.so* /valve-runtime ; \
|
||||
cp -aR /files/lib/x86_64-linux-gnu/libgcrypt*.so* /valve-runtime ; \
|
||||
rm -rf /steam-runtime /steam-runtime.tar.xz
|
||||
|
||||
FROM bellsoft/alpaquita-linux-base:stream-glibc
|
||||
|
||||
COPY --from=builder /etc/ssl/certs /etc/ssl/certs
|
||||
COPY --from=builder /usr/lib32 /lib32
|
||||
COPY --from=builder /valve-runtime /lib
|
||||
|
||||
ADD --chmod=0555 https://dl.min.io/client/mc/release/linux-amd64/mc /usr/local/bin
|
||||
# ADD --chown=1000:1000 --chmod=0755 https://i.floss.media/cert.pem /cert.pem
|
||||
|
||||
|
||||
RUN { \
|
||||
echo '#!/usr/bin/env bash'; \
|
||||
echo 'set -e'; \
|
||||
echo 'LD_LIBRARY_PATH=/lib32:"${HOME}"/steamcmd/linux32 "${HOME}"/steamcmd/steamcmd.sh "${@}"'; \
|
||||
} > /usr/local/bin/steamcmd
|
||||
|
||||
RUN set -exu ; \
|
||||
apk add --no-cache \
|
||||
curl \
|
||||
rsync \
|
||||
libstdc++ \
|
||||
libuv \
|
||||
bash \
|
||||
; \
|
||||
rm -rf /var/cache/apk/* ; \
|
||||
ln -s /lib32/ld-linux.so.2 /lib/ld-linux.so.2 ; \
|
||||
addgroup -g 1000 -S steam ; \
|
||||
adduser -g steam -G steam -S -D -h /home/steam -u 1000 steam ; \
|
||||
chmod +x /usr/local/bin/steamcmd ; \
|
||||
install -d -o steam -g steam /app /cache
|
||||
|
||||
USER steam
|
||||
|
||||
RUN set -exu ; \
|
||||
mkdir -p "${HOME}"/steamcmd "${HOME}"/.steam/sdk32 ; \
|
||||
curl "https://media.steampowered.com/installer/steamcmd_linux.tar.gz" | tar xvzf - -C "${HOME}/steamcmd" ; \
|
||||
ln -sf "${HOME}"/steamcmd/linux32/steamclient.so "${HOME}"/.steam/sdk32/steamclient.so
|
||||
Reference in New Issue
Block a user