working again! with various improvements listed in README.md; renamed to shocker (shell docker)#34
Open
traceypooh wants to merge 25 commits into
Open
working again! with various improvements listed in README.md; renamed to shocker (shell docker)#34traceypooh wants to merge 25 commits into
traceypooh wants to merge 25 commits into
Conversation
… no longer relevant
…; doc improvements
…tect if no cgroups and skip
…ntation
* shocker run can now use image name directly
* shocker pull no longer uses /tmp -- unpacks on-the-fly directly into btrfs volume.
* Slugify ps- and img- names.
* Document shocker-in-shocker (with example).
* Document shocker "build" alternatives.
* Can pull from private registries w/ user/pass, eg: self-hosted gitlabs, etc. via new env vars:
SHOCKER_REGISTRY
SHOCKER_REGISTRY_USER
SHOCKER_REGISTRY_PASS
* track and respect any WORKDIR * allow runtime env vars via: shocker run -e * better run -it typical dev + tty setup (via devtmpfs) * better new /shocker/ top-level dir w/ image metdata (instead of 3+ files)
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.
renaming to shocker is optional. i did that in case the work doesnt get merged back :)
2026 Modernization
What broke in bocker and what shocker fixes
shocker_pull→ full rewrite for Registry v2index.docker.io/v1/), which was shut down in 2023. Shocker uses the v2 API with proper OAuth2 Bearer token auth, fetches the manifest (accepting both Docker schema v2 and OCI formats), extracts layer digests, and pulls blobs by digest.cgroups v1 → v2 support/sys/fs/cgroup/, mapscpu.shares→cpu.weight,memory.limit_in_bytes→memory.maxshuf -i 42002-42254— only 252 possible values, almost guaranteed collision if you run a few containers. shocker uses 5 hex digits($RANDOM * $RANDOM % 0xFFFFF)= ~1 million values.02:42:ac:11:00$macwas only a 2-octet suffix from 3 decimal digits, producing malformed MACs. shocker derives a proper 6-octet MAC from 4 hex chars of the UUID.shocker_exec PIDlookupps | grep | awk | greppipeline was fragile and often broke. Replaced with a singleps -eo pid,args | awkthat matches the unshare process for the container UUID.Second pass of fixes/improvements
16#${uuid} % 253) rather than just the last 2 hex digits, significantly reducing the chance of two containers getting the same IPprintf '%08x'then slices into 4 cleanxxoctets; fixes potential truncation with short UUID values and removes fragilesedregexshocker_pull— manifest list handling — now accepts manifest list / OCI image index media types, detects which type was returned, then resolves to the correct platform digest (matchinguname -mnormalized to OCI arch names:amd64,arm64,arm) before fetching the actual image manifest; fixes accidentally pulling layers for the wrong architectureshocker_pull— config blob fix — switched fromgrepon raw JSON topython3parsinglayers[]explicitly; the config blob lives underconfignotlayers, so the old grep was incorrectly including it and causingtarto fail on a non-tarballThird pass of fixes
:latestwhen omittedSHOCKER_REGISTRYenv var for Nexus/mirror pull-through (see below)btrfscheck with setup instructions (see below)bridge0+ NAT auto-created on first run_cg_execFourth pass of fixes/improvements
run --rmandrun -itnew optional CLI flags features workingbtrfsfor non-help screensFifth pass of fixes/improvements
iptablesnetwork forwarding so networking out inside containers works/etc/resolv.confsince may have specific DNS resolving setup