Case studies
#powershell#debugging#windows#electron#docker#pterodactyl#python#csharp#wpf#bash#security#cpp#git#performance#ci#nodejs#pyside6#react-native
6 posts · #docker
Clear filters·5 min read

Pterodactyl yolks · Story
A Crystal image that built fine but could not link: the tarball's static libgc
The official Crystal tarball bundles a static libgc.a built for a newer glibc than Debian bookworm. The Dockerfile deletes it so the linker uses the system libgc instead.
In short
- The official Crystal tarball ships a static libgc.a that needs a symbol (isoc23strtol) newer than glibc in Debian bookworm.
- The Dockerfile deletes /opt/crystal/lib/crystal/libgc.a and installs libgc-dev, so the linker uses Debian's own libgc.
- One image per Crystal version, picked by a build argument, with the C library headers Crystal links against installed up front.
#docker#crystal#glibc#linker#pterodactyl
·5 min read

Pterodactyl yolks · Story
Vaultwarden on a game-server panel: hashing the admin token at every start
A panel variable should be something a person can type. The Vaultwarden image hashes the admin password with argon2 on each boot, and unsets the token when the field is empty.
In short
- The panel variable VWADMINPASSWORD is hashed with the argon2 CLI at each start and exported as ADMINTOKEN; an empty variable unsets the token and disables /admin.
- The image is the official Vaultwarden one, re-based to run as an unprivileged container user, with all state under /home/container/data and the port taken from the panel's allocation.
- The script also warns when a saved config.json exists, because settings saved on the admin page override the panel's variables, and it turns a bare domain into an https:// one.
#docker#bash#vaultwarden#pterodactyl#argon2
·6 min read

Pterodactyl yolks · Story
SQL Server built fine and could not start under Wings
A passing docker build proved nothing. A file capability on sqlservr and an eval echo on the startup string only showed up once CI booted the image the way Wings does.
In short
- sqlservr ships with the capnetbindservice file capability, and Wings drops that capability, so the kernel refuses to exec it.
- Rewriting each executable removes the capability, and a CI boot test with Wings' uid and dropped capabilities now gates publishing.
- The same test caught the startup string being expanded with eval echo, which ran the panel's console banner as code.
#docker#pterodactyl#sql-server#ci#security
·5 min read

Pterodactyl yolks · Story
A MySQL init file full of passwords, and a CI check that raced it
MySQL's first start needs a SQL file with the root and app passwords in it. I moved it out of the startup line, locked down the run directory, and fixed a test that raced the cleanup.
In short
- The init file is now referenced from the generated config (init-file=...), not appended to the startup line and echoed to the console.
- The socket and pid file moved from /tmp into a run directory created with mode 700.
- The CI step that asserts the init file is gone now waits for the removal instead of racing it.
#mysql#docker#pterodactyl#security#ci
·5 min read

Pterodactyl yolks · Story
The n8n image had no bash, so my entrypoint became POSIX sh
My first n8n entrypoint assumed bash, setsid and a package manager. The base image had none of them. Rewriting it in plain sh meant rethinking how shutdown reaches the process.
In short
- The base image n8nio/n8n has no bash and no package manager, so the apk add line and the bash entrypoint both had to go.
- The entrypoint became POSIX sh, and the passwd entry for uid 988 points at /bin/sh.
- Shutdown now uses kill -TERM -1, which is only safe because the script is PID 1 in the container.
#docker#shell#n8n#pterodactyl#posix
·5 min read

Pterodactyl yolks · Story
One missing curl flag broke my mail server setup
Stalwart's first-start setup could not open a JMAP session. I printed the response, and fifty seconds later the fix was a single letter: curl -L.
In short
- The setup script asked for the JMAP session with curl -fsS, which treats a redirect as success but does not follow it.
- A debug commit printed the response body on failure, then -L made curl follow the redirect.
- The CI checks that call the same URL needed the same flag, or they would have asserted on the wrong status code.
#curl#jmap#docker#pterodactyl#debugging