Repository navigation
fix: align with base image layout so runners register; runner 2.338.0 - #5
Merged
Merged
Conversation
The base image moved to WORKDIR /app with its own /app/startup.sh and /app/Vagrantfile. Our Dockerfile still copied to /Vagrantfile.tmp and /startup.sh, so at runtime the startup script found the base image's generic /app/Vagrantfile, skipped the envsubst step and booted a plain Windows VM: no runner download, no config.cmd. The published 1.2.0 image has exactly this layout. Follow the base image's pattern instead: the Vagrantfile reads its settings from ENV in Ruby and is copied straight to /app/Vagrantfile, and the base /app/startup.sh (libvirtd readiness wait, QEMU fallback, graceful halt) is reused. This removes startup.sh, envsubst, the variable allow-list and the DOLLAR/RANDOM_STR leftovers. Also while in the Vagrantfile: - forward 3389 (RDP) and 22->2222 (SSH) like the base image; drop the unused 445 forward and private_network - stable runner names <name>_<container hostname>_<n> so --replace reuses registrations instead of leaving offline duplicates - wait for the Visual Studio bootstrapper (--wait --norestart) so runners don't register before the toolchain exists - derive the runner download URL from GITHUB_RUNNER_VERSION so it can be overridden from .env without a rebuild - update GitHub runner to 2.338.0, pin base image to 1.0.1 docker-compose.yml: drop obsolete version key, add cgroup: host, platform, restart policy, hostname, SSH port. Track .env.example instead of .env and git-ignore .env.
Lint runs hadolint on the Dockerfile, ruby -c on the Vagrantfile and actionlint on the workflows for every PR. Dependabot tracks the GitHub Actions and the base image tag. Release workflow gets an explicit permissions block; unused TAG_NAME env removed.
…tents Fix truncated sentence, docker compose v2 commands, typos; add KVM and cgroup prerequisites, .env.example flow, full variable table, runner naming scheme, installed toolchain with VS licensing note, SSH access, and a development section.
These belong to efd3438 ("align image with base /app layout") but were left out of that commit by a failed git add; its message describes the changes in this commit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current Behaviour
The published image boots a Windows VM but never registers a runner.
The base image (
windows-in-docker-container) moved toWORKDIR /appwith its own/app/startup.shand/app/Vagrantfile. This repo's Dockerfile still copied to/Vagrantfile.tmpand/startup.sh. At runtime our startup script ran from/app, found the base image's generic/app/Vagrantfile, skipped the envsubst step, andvagrant upprovisioned a plain VM — no runner download, noconfig.cmd, no VS/Rtools.Verified against the registry rather than inferred: the config of
docker.io/vaggeliskls/windows-github-custom-runner:1.2.0hasWorkingDir: /app, the base'sCOPY --chmod=755 startup.sh Vagrantfile /app/layer, and ourENTRYPOINT ["/startup.sh"]on top.Secondary issues:
RUNNERSrunners with fresh random names and never removed the old ones, so--replacecould never match and offline duplicates accumulated in the org.vs_enterprise.exe --quietwas not awaited, so runners could register while Visual Studio was still installing.:latest;docker-compose.ymlused the obsoleteversion:key and lackedcgroup: host;.env(which holds the PAT) was tracked with an empty.gitignore; README had a truncated sentence and v1docker-composecommands.Expected Behaviour
/app/Vagrantfile; the base/app/startup.sh(libvirtd readiness wait, QEMU fallback, gracefulvagrant halton SIGTERM) is reused.startup.sh,envsubst, the variable allow-list and theDOLLAR/RANDOM_STRleftovers are gone. Dockerfile is nowFROM+ENV+ oneCOPY.private_networkdropped.<GITHUB_RUNNER_NAME>_<container hostname>_<n>, so--replacetakes over existing registrations on restart.hostname:is set in the compose file.--wait --norestartunderStart-Process -Wait.GITHUB_RUNNER_VERSIONin the Vagrantfile, so the version (and name/labels) can be overridden from.envwithout a rebuild.1.0.1;actions/checkoutv6 → v7 (the docker/* actions are already on their latest majors).lint.ymlon PRs: hadolint,ruby -c Vagrantfile, actionlint. Newdependabot.ymlfor GitHub Actions and the base image tag. Release workflow gets an explicitpermissionsblock..env.exampletracked,.envand.vagrant/ignored. README rewritten: KVM/cgroup prerequisites, variable table, runner naming, VM contents with a VS Enterprise licensing note, SSH access, development notes.Unchanged on purpose: VS 2022 Enterprise / NativeDesktop workload and Rtools 4.0 — product choices, flagged in the README.
Verification
ruby -c VagrantfileOK; rendered the provisioning script through a stub Vagrant DSL with sample env to check interpolation and backslash escaping (single backslashes, correct runner names/URL/auth, abort messages fire whenRUNNER_URLorPAT/TOKENare missing).docker compose configvalid.docker compose upon a KVM host — please run one before cutting the release if you have a box handy.