Skip to content

Play with one docker command, and print the link once the server is up - #56

Merged
lagergren merged 1 commit into
mainfrom
lagergren/play-with-docker
Nov 7, 2026
Merged

lagergren merged 1 commit into
mainfrom
lagergren/play-with-docker

Conversation

@lagergren

Copy link
Copy Markdown
Owner

What

A machine with only Docker or Podman and internet access can now play with one command. It needs no checkout, no git, and no JDK:

docker run --rm -it --pull always --name rylween -p 127.0.0.1:8081:8081 -v rylween-data:/data -e RYLWEEN_AUTH_SECURE_COOKIES=false ghcr.io/lagergren/rylween

It pulls the latest release from ghcr.io and starts it. Once the server accepts connections, it prints:

Rylween 0.9.3 is up. To play, open:

    http://localhost:8081/login

Changes

  • The link: the bitmap server prints it once its socket accepts connections. The URL has a line to itself so terminals make exactly that clickable. It points to the login page, or to / in a --user session, which needs no login.
    • The game's name comes from the bundle, so the runtime names no game content.
    • The start log event also records the link.
  • The address: the bind address, with a wildcard read as localhost. In a container that matches the documented -p 127.0.0.1:8081:8081. RYLWEEN_PUBLIC_URL or --public-url overrides it, for example when publishing on another port.
  • README: leads "Running The Game" with the command. It also covers getting Docker or Podman with Homebrew: brew install podman && podman machine init --now, or brew install --cask docker. brew install docker alone installs only the client, not the engine that runs containers.
  • Release notes: they now give the same command, pinned to the release, and say the link appears once the server is up.

The published 0.9.2 image already runs with this command but doesn't print the link. The next release (./gradlew releaseDist) will.

Testing

Built the image from this branch with Podman and ran the README command against it:

  • The output ends with the link, and the link serves the login page (HTTP 200).
  • Registering over plain HTTP sets a non-Secure session cookie. /play loads, and / redirects to /play once logged in.
  • SIGINT, which is what Ctrl-C sends, stops the server, --rm removes the container, and the data volume stays.
  • Running the launcher directly prints http://localhost:<port>/login for a 0.0.0.0 bind. With RYLWEEN_PUBLIC_URL, it prints that address instead.
  • :runtime-bitmap-web tests pass on a forced rerun (28, none skipped), and ktlint is clean. The release workflow passes actionlint.

… with one docker command

Once the server accepts connections it prints the game's name and version
and, on a line of its own so terminals make it clickable, the link to
open: the login page, or the game itself in a --user session. The address
is the bind address, with a wildcard read as localhost, unless
RYLWEEN_PUBLIC_URL or --public-url names another; the start log event
records it too.

With that, a machine with only Docker or Podman and internet access plays
with one command, which the README now leads with:

  docker run --rm -it --pull always --name rylween -p 127.0.0.1:8081:8081 -v rylween-data:/data -e RYLWEEN_AUTH_SECURE_COOKIES=false ghcr.io/lagergren/rylween

It pulls the latest release, starts it, and prints
http://localhost:8081/login. The README also covers getting Docker or
Podman with Homebrew, where `brew install docker` alone lacks the engine,
and the release notes give the same command for the release's own image.
@lagergren
lagergren merged commit 8932ad4 into main Nov 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant