Repository navigation
Proposal: an optional shell-less Chiseled Ubuntu image (off by default) #19989
shsteveno-dot
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
I have built a container image of Snipe-IT that has no shell (
/bin/shdoes not exist) and is cut from Ubuntu 24.04 with Chisel. I would like to know whether you would want something like this in the repository before I open a PR. If you would rather not carry it, I will keep it in my fork and nothing is lost.Branch (based on
developba9425c): https://github.com/shsteveno-dot/snipe-it/tree/chiseled-runtimeWhy
FROM scratchplus only the files PHP, Apache and the MariaDB client need: 543 MB asdocker imagesreports it, against 1.48 GB forsnipe/snipe-it:latestand 738 MB forsnipe/snipe-it:latest-alpine(both pulled from Docker Hub on 2026-10-27 and measured the same way). No package manager and no shell in the final image.composer.lock,go.mod) is pinned by SHA-256 and the build stops if a byte differs, so the same inputs rebuild the same image.8.3.6-0ubuntu0.24.04.13, which carries Ubuntu's fix for CVE-2026-109618 / CVE-2026-109619 (USN-8948).php -vstill prints 8.3.6, because Ubuntu backports the fix. The arm64 lock is still at.11and does not have this fix yet.What it changes
Dockerfile.chiseled,docker/chiseled/(locks, slice definitions, build scripts, README),docker/snipeit-runtime/(two small Go programs:snipeit-initfor first-run setup and migrations,snipeit-supervisorfor the web server and the scheduler; there is no queue worker, the image defaults toQUEUE_CONNECTION=sync)App\Console\Scheduling\*) and an argument-array form of the database client launch insnipeit:restore, and, in the image build only, a patch of the vendoredspatie/db-dumperso that backups also run without a shell. All of these are only used whenSNIPEIT_SHELLLESS=true; the image sets it, every other install keeps the framework behaviour. New config keyapp.shellless, defaultfalse.Dockerfile,Dockerfile.alpineanddocker/entrypoints are not modified.About 16,000 added lines, but about 15,000 of them are hash locks, slice definitions and package metadata; the PHP part is 12 files, about 980 lines including tests.
What I tested (amd64 only)
masterontodevelop: first-run setup and login,schedule:run, mail delivery to a sink, backup, no OPcache files written, no OOM under a 1.5 GB limit. The image has not been rebuilt since the rebase; the PHPUnit tests below were re-run ondevelop.all-changesbranch), an end-to-end restore on the image against an S3 mock: backup,snipeit:restore --validate-onlyaccepts the good archive and rejects a damaged one without touching the database, the restore brings the database back, and login works afterwards (11 of 11 checks). The mock bucket held no upload files in that run, so it did not copy any S3 file.vetand unit tests, Python build-tool tests, and PHPUnit for the scheduler, the opt-in switch andsnipeit:restore.Not tested
.11packages.Questions
SNIPEIT_SHELLLESSswitch acceptable for the PHP side, or would you rather have the shell-less behaviour split into a separate package?composer.lockchanges (python3 docker/chiseled/repin_app_inputs.py). Is that acceptable for your release process, or should the image be built from a looser lock?Related discussions: #12349 (Docker images overhaul, about the existing images) and #19903 (asks why the image reports PHP 8.3.6; this image also reports 8.3.6, with Ubuntu's backported fix on amd64 as described above).
An earlier combined PR (#19934) is closed; I split it up. Related, separate from this proposal: a bug report for S3 problems and a small SMTP PR. They do not depend on this.
🤖 Generated with Claude Code
All reactions