[PR #76] [MERGED] WIP: create base and base-x11 images, move common init functionality to them #135

Closed
opened 2026-10-15 12:49:22 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/gow/pull/76
Author: @zb140
Created: 9/4/2022
Status: ✅ Merged
Merged: 10/10/2022
Merged by: @zb140

Base: master ← Head: refactor


📝 Commits (9)

  • 3483116 * create base and base-x11 images, move common init functionality to them
  • 88f1e77 rename base-x11 to base-app; change xorg to use base instead of base-app
  • e853838 fix xorg container
  • 9ada393 remove references to a specific repository
  • d501de8 provide the name of the base and base-app images as build args
  • f423e4f fix default build env
  • 20a6a37 Update the build docs to explain how to build all the new images
  • a47f9c8 Move ICD to base-app, since any image that wants Vulkan will need it
  • 2342ba5 fix warning on launch

📊 Changes

31 files changed (+503 additions, -361 deletions)

View changed files

➕ .github/workflows/auto-build.yml (+46 -0)
📝 .github/workflows/docker-build-and-publish.yml (+65 -29)
📝 compose/headless.yml (+18 -13)
📝 compose/retroarch.yml (+5 -4)
📝 compose/steam.yml (+6 -4)
📝 docker-compose.yml (+6 -4)
📝 docs/modules/ROOT/pages/docker-build.adoc (+47 -6)
➕ env/build.env (+2 -0)
➕ images/base-app/Dockerfile (+26 -0)
📝 images/base-app/configs/nvidia_icd.json (+0 -0)
➕ images/base-app/scripts/startup.sh (+11 -0)
📝 images/base-app/scripts/wait-x11 (+6 -6)
➕ images/base/Dockerfile (+38 -0)
📝 images/base/build/setup-retro-user (+8 -8)
➕ images/base/scripts/bootstrap.sh (+15 -0)
📝 images/base/scripts/ensure-groups (+10 -12)
➕ images/base/scripts/lib/utils.sh (+5 -0)
📝 images/pulseaudio/Dockerfile (+21 -18)
📝 images/pulseaudio/scripts/startup.sh (+7 -7)
📝 images/retroarch/Dockerfile (+13 -22)

...and 11 more files

📄 Description

I had so much fun refactoring the compose files, I did some refactoring on the Dockerfiles too 😁

The biggest improvements are

  • I created a base and a base-x11 image. These are used to keep container init logic like creating users, ensuring device access, etc in one central location. They also provide a central place to change the "actual" base distro for all containers at the same time.
  • All containers are now based on ubuntu:22.04. This fixes build issues associated with ubuntu:21.04 being EOL.
  • Streamlined the container startup process to eliminate duplicated code
  • Made some (admittedly small) optimizations for image size

If anyone wants to give these images a try, I've published builds of them on my own GitHub account (eg ghcr.io/zb140/gow-sunshine:refactor).

This PR is not quite ready for merge as-is. Some things that still need doing:

  • In order to get the images built on GitHub, there's a bunch of places that reference images in my GitHub account. Those would need to change to the real GoW account.
  • I had to modify .github/workflows/docker-build.yml in a couple of places. Most notably, I had to disable parallel builds because I couldn't figure out how to specify dependencies between matrix entries. If that turns out to be impossible, I'll need to figure out a different solution.
  • The Sunshine Dockerfile in this branch is currently set up to build the forked branch that contains the Pulseaudio crash fix. We'll probably want to switch that to something else, or else not merge this until after that bug is fixed.
  • Probably other stuff that I haven't thought of. (Anyone who has any thoughts, feel free to chime in and add tasks 😄)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/gow/pull/76 **Author:** [@zb140](https://github.com/zb140) **Created:** 9/4/2022 **Status:** ✅ Merged **Merged:** 10/10/2022 **Merged by:** [@zb140](https://github.com/zb140) **Base:** `master` ← **Head:** `refactor` --- ### 📝 Commits (9) - [`3483116`](https://github.com/games-on-whales/gow/commit/34831167cc984c09a35600899749820e497c1f87) * create base and base-x11 images, move common init functionality to them - [`88f1e77`](https://github.com/games-on-whales/gow/commit/88f1e7753061374555eae1d6fd620f6e5b58a88e) rename base-x11 to base-app; change xorg to use base instead of base-app - [`e853838`](https://github.com/games-on-whales/gow/commit/e853838edf99304f08fd4e53f2d4bff551b70d82) fix xorg container - [`9ada393`](https://github.com/games-on-whales/gow/commit/9ada393c99359d14f3702c8f1810e8f298a2cc8a) remove references to a specific repository - [`d501de8`](https://github.com/games-on-whales/gow/commit/d501de871fab98531365f7d90a4cf3d73daa2fe0) provide the name of the base and base-app images as build args - [`f423e4f`](https://github.com/games-on-whales/gow/commit/f423e4fce6f8d6cafc0ca530a5074335aa8260fb) fix default build env - [`20a6a37`](https://github.com/games-on-whales/gow/commit/20a6a3770bfad186736d2c1e53ad209ab98b6db5) Update the build docs to explain how to build all the new images - [`a47f9c8`](https://github.com/games-on-whales/gow/commit/a47f9c87a0672945f0640e5024d1a27ccba601bf) Move ICD to base-app, since any image that wants Vulkan will need it - [`2342ba5`](https://github.com/games-on-whales/gow/commit/2342ba52a61c0bad5051e12faffd72bdc89fa9cf) fix warning on launch ### 📊 Changes **31 files changed** (+503 additions, -361 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/auto-build.yml` (+46 -0) 📝 `.github/workflows/docker-build-and-publish.yml` (+65 -29) 📝 `compose/headless.yml` (+18 -13) 📝 `compose/retroarch.yml` (+5 -4) 📝 `compose/steam.yml` (+6 -4) 📝 `docker-compose.yml` (+6 -4) 📝 `docs/modules/ROOT/pages/docker-build.adoc` (+47 -6) ➕ `env/build.env` (+2 -0) ➕ `images/base-app/Dockerfile` (+26 -0) 📝 `images/base-app/configs/nvidia_icd.json` (+0 -0) ➕ `images/base-app/scripts/startup.sh` (+11 -0) 📝 `images/base-app/scripts/wait-x11` (+6 -6) ➕ `images/base/Dockerfile` (+38 -0) 📝 `images/base/build/setup-retro-user` (+8 -8) ➕ `images/base/scripts/bootstrap.sh` (+15 -0) 📝 `images/base/scripts/ensure-groups` (+10 -12) ➕ `images/base/scripts/lib/utils.sh` (+5 -0) 📝 `images/pulseaudio/Dockerfile` (+21 -18) 📝 `images/pulseaudio/scripts/startup.sh` (+7 -7) 📝 `images/retroarch/Dockerfile` (+13 -22) _...and 11 more files_ </details> ### 📄 Description I had so much fun refactoring the compose files, I did some refactoring on the `Dockerfile`s too :grin: The biggest improvements are - I created a `base` and a `base-x11` image. These are used to keep container init logic like creating users, ensuring device access, etc in one central location. They also provide a central place to change the "actual" base distro for all containers at the same time. - All containers are now based on `ubuntu:22.04`. This fixes build issues associated with `ubuntu:21.04` being EOL. - Streamlined the container startup process to eliminate duplicated code - Made some (admittedly small) optimizations for image size If anyone wants to give these images a try, I've published builds of them on my own GitHub account (eg `ghcr.io/zb140/gow-sunshine:refactor`). This PR is not quite ready for merge as-is. Some things that still need doing: - [x] In order to get the images built on GitHub, there's a bunch of places that reference images in my GitHub account. Those would need to change to the real GoW account. - [x] I had to modify `.github/workflows/docker-build.yml` in a couple of places. Most notably, I had to disable parallel builds because I couldn't figure out how to specify dependencies between matrix entries. If that turns out to be impossible, I'll need to figure out a different solution. - [ ] The Sunshine `Dockerfile` in this branch is currently set up to build the forked branch that contains the Pulseaudio crash fix. We'll probably want to switch that to something else, or else not merge this until after that bug is fixed. - [x] Probably other stuff that I haven't thought of. (Anyone who has any thoughts, feel free to chime in and add tasks :smile:) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 12:49:22 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/gow#135
No description provided.