Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.git
.gitignore
.github
.roo
openspec
assets
README.md
CHANGELOG.md
.gemini
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "monthly"
93 changes: 89 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,101 @@ name: Docker Image CI
on:
push:
branches: [ "main" ]
tags: [ "v*.*.*" ]
pull_request:
branches: [ "main" ]

jobs:
permissions:
packages: write
contents: write

env:
GHCR_IMAGE: ghcr.io/${{ github.repository }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push to GHCR
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ env.GHCR_IMAGE }}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max

test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pull image for testing
run: docker pull ${{ env.GHCR_IMAGE }}:${{ github.sha }}

- name: Run E2E Startup Test
run: ./scripts/test-startup.sh ${{ env.GHCR_IMAGE }}:${{ github.sha }}

- name: Show logs on failure
if: failure()
run: |
docker ps -a
# The container name has a timestamp, so we list all to find it
docker logs $(docker ps -a -q --filter ancestor=${{ env.GHCR_IMAGE }}:${{ github.sha }}) || true

publish:
needs: test
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag vrising:$(date +%s)
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Pull image from GHCR
run: docker pull ${{ env.GHCR_IMAGE }}:${{ github.sha }}

- name: Tag and push to Docker Hub
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
DOCKERHUB_REPO="${{ secrets.DOCKERHUB_USERNAME }}/vrising-dedicated"

docker tag ${{ env.GHCR_IMAGE }}:${{ github.sha }} $DOCKERHUB_REPO:latest
docker tag ${{ env.GHCR_IMAGE }}:${{ github.sha }} $DOCKERHUB_REPO:$TAG_NAME

docker push $DOCKERHUB_REPO:latest
docker push $DOCKERHUB_REPO:$TAG_NAME

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
51 changes: 51 additions & 0 deletions .github/workflows/prune-registries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Prune Registries

on:
schedule:
- cron: '0 0 * * 0' # Every Sunday at midnight
workflow_dispatch: # Allow manual triggering

jobs:
prune-ghcr:
runs-on: ubuntu-latest
steps:
- name: Prune untagged GHCR images
uses: vlaurin/action-ghcr-prune@main
with:
token: ${{ secrets.PAT_WITH_DELETE_PACKAGES_SCOPE }}
user: ${{ github.actor }}
container: docker-vrising
prune-untagged: true
dry-run: false

prune-dockerhub:
runs-on: ubuntu-latest
steps:
- name: Prune old commit-SHA tags from Docker Hub
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
run: |
echo "Authenticating with Docker Hub..."
TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${DOCKERHUB_USERNAME}'", "password": "'${DOCKERHUB_TOKEN}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)

if [ "$TOKEN" == "null" ] || [ -z "$TOKEN" ]; then
echo "Failed to get Docker Hub token. Please check your secrets."
exit 1
fi

REPO="${DOCKERHUB_USERNAME}/vrising-dedicated"
echo "Fetching tags for ${REPO}..."

# Fetch up to 100 tags to prune old commit SHAs
TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" "https://hub.docker.com/v2/repositories/${REPO}/tags/?page_size=100" | jq -r '.results|.[]|.name')

for TAG in $TAGS; do
# Keep 'latest' and semantic version tags (e.g. v1.0.0, 1.0.0)
if [[ "$TAG" != "latest" ]] && [[ ! "$TAG" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "Deleting legacy/commit-SHA tag: $TAG"
curl -s -X DELETE -H "Authorization: JWT ${TOKEN}" "https://hub.docker.com/v2/repositories/${REPO}/tags/${TAG}/"
else
echo "Keeping official tag: $TAG"
fi
done
34 changes: 34 additions & 0 deletions .github/workflows/update-vrising.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check for V Rising Updates

on:
schedule:
- cron: '0 0 * * 0' # Every Sunday at midnight
workflow_dispatch:

jobs:
check-vrising-update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Get latest V Rising buildid
id: vrising_build
run: |
LATEST_BUILD=$(curl -s https://api.steamcmd.net/v1/info/1828900 | jq -r '.data."1828900".depots.branches.public.buildid')
echo "latest=$LATEST_BUILD" >> "$GITHUB_OUTPUT"

- name: Update Dockerfile
if: steps.vrising_build.outputs.latest != 'null' && steps.vrising_build.outputs.latest != ''
run: |
LATEST_BUILD="${{ steps.vrising_build.outputs.latest }}"
sed -i "s/ARG VRISING_BUILD_ID=\".*\"/ARG VRISING_BUILD_ID=\"$LATEST_BUILD\"/" Dockerfile

- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
with:
commit-message: "chore(deps): update v rising build to ${{ steps.vrising_build.outputs.latest }}"
title: "Update V Rising Build ID to ${{ steps.vrising_build.outputs.latest }}"
body: "Automated update of V Rising build ID in the Dockerfile to trigger a new image build."
branch: "update-vrising"
delete-branch: true
42 changes: 42 additions & 0 deletions .github/workflows/update-wine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Check for Wine Updates

on:
schedule:
- cron: '0 0 1 * *' # 1st of every month
workflow_dispatch:

jobs:
check-wine-update:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Add WineHQ Repository
run: |
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/noble/winehq-noble.sources
sudo dpkg --add-architecture i386
sudo apt-get update

- name: Get latest Wine version
id: wine_version
run: |
LATEST_WINE=$(apt-cache policy winehq-stable | grep Candidate | awk '{print $2}')
echo "latest=$LATEST_WINE" >> "$GITHUB_OUTPUT"

- name: Update Dockerfile
if: steps.wine_version.outputs.latest != ''
run: |
LATEST_WINE="${{ steps.wine_version.outputs.latest }}"
sed -i "s/ARG WINE_VERSION=\".*\"/ARG WINE_VERSION=\"$LATEST_WINE\"/" Dockerfile

- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
with:
commit-message: "chore(deps): update wine to ${{ steps.wine_version.outputs.latest }}"
title: "Update Wine to ${{ steps.wine_version.outputs.latest }}"
body: "Automated update of Wine version in the Dockerfile."
branch: "update-wine"
delete-branch: true
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Changelog

All notable changes to this project will be documented in this file.

## [2026-02-28]

- Added native Docker `HEALTHCHECK` using a UDP ping to the V Rising Query Port.
- Added documentation for running a persistent RCON sidecar (`gorcon/rcon-cli`) using Docker Compose.
- Standardized the default `SERVERNAME` to `vrising-dedicated` across all scripts and configuration examples.
- Standardized the default timezone (`TZ`) to `Europe/Rome`.
- Removed legacy `--entrypoint` workaround commands from all documentation examples.

## [2026-02-27]

- Added automated GitHub Actions workflows to check for Wine and V Rising updates and create Pull Requests.
- Updated Dockerfile to use explicit `ARG` version tracking for Wine and V Rising to support automated updates.
- Optimized Ubuntu 24.04 and Wine environment for improved server stability.
- Standardized LF line endings for all container-internal scripts to prevent execution errors.
- Automated Steam license acceptance during Docker build process.
- Fixed SteamCMD configuration to ensure reliable server installation and updates.
- Improved CI/CD pipeline with automated E2E testing
- Standardized project structure and documentation.

## [026-02-21]

Docker image rebuild + tested on a linux dockerhost (unraid).<br>
For now, u need to add this to the compose file:<br>
`entrypoint: ["/bin/bash", "-c", "sed -i 's/\\r//g' /start.sh && exec /bin/bash /start.sh"]` <br>
Thx [laerdev](https://github.com/laerdev) for the fix.<br>

## [2025-08-01]

- Just tested the latest image for V-Rising 1.1.
- Log will be spammed with these messages. Feel free to give me a solution here.<br>
01b4:fixme:winsock:server_ioctl_sock Unsupported ioctl 4004747b (device=4004 access=1 func=d1e method=3)<br>
vrising-1 | 01b4:fixme:winsock:WSAIoctl unsupported WS_IOCTL cmd (SIO_IDEAL_SEND_BACKLOG_QUERY)
- There is no way to continue a game from 1.0. I just checked with the discord community.
- Still an issue: when the server is passworded, joining via Steam seems not possible. Use the ingame server list to join.

## [2024-05-16]

- Merged with [pull65](https://github.com/TrueOsiris/docker-vrising/pull/65) from [Killerherts](https://github.com/killerherts).<br>
Logs older than 30 days are cleaned up on server start.
- Merged with [pull52](https://github.com/TrueOsiris/docker-vrising/pull/52) from [Diyagi](https://github.com/diyagi).<br>
Previous container version can still be grabbed via [trueosiris/vrising:2.0](https://hub.docker.com/layers/TrueOsiris/vrising/2.0/images/sha256-b9142d6f653685c92e25745f48cd205a1ffc7ed4aedef19011b03ab2a03a33c6?context=repo)<br>
Main fixes are: clean shutdown & complete log to container log. Kudos!
- Added date to the logfile name, so per server launch, a logfile will be created. For now, they will not be automatically cleaned up.
- If you're experiencing [this issue](https://github.com/TrueOsiris/docker-vrising/issues/51) with "[476:488:20240511,134828.926:ERROR http_transport_win.cc:388] HTTP status 403" in the log, pull [TrueOsiris/vrising-dedicated:display](https://hub.docker.com/layers/TrueOsiris/vrising/display/images/sha256-592b9ace78b7228c08134804fa94b0f47766bb9202d86048a0a4ded81f765cda?context=repo) which uses xvfb.
- If you're experiencing [this issue](https://github.com/TrueOsiris/docker-vrising/issues/43) with "wine: Assertion failed at address 00007F79E2C9EA7C (thread 0094)" in the log, u might need the latest wine from winehq, therefore grab [TrueOsiris/vrising-dedicated:winehq](https://hub.docker.com/layers/TrueOsiris/vrising/winehq/images/sha256-f7f662258b30d6250d16718aa008a95b868336c92fdd98e56fd39bbca5626f8c?context=repo)
Loading