CLI for Spring Boot Dockerfile and benchmark workflows (Maven/Gradle).
Project description
springdocker CLI
CLI for Spring Boot Dockerfile and benchmark workflows across Maven and Gradle projects.
Install
Local editable
python3 -m pip install -e .
pipx
pipx install springdocker
springdocker --help
Upgrade:
pipx upgrade springdocker
uv
uv tool install springdocker
uv tool upgrade springdocker
# benchmark/evidence commands need optional extras
python3 -m pip install -e '.[benchmark]'
Quick usage
springdocker init --project-root samples/java-spring-docker --build-tool maven --profile quick
springdocker doctor --project-root samples/java-spring-docker
springdocker inspect --project-root samples/java-spring-docker --format json
springdocker explain --project-root samples/java-spring-docker Dockerfile.generated --format json
springdocker benchmark compare --project-root samples/java-spring-docker benchmarks/03-custom-jre-jlink/results/raw.csv --baseline-variant with-jlink-runtime --format json
springdocker dockerfile generate --project-root samples/java-spring-docker --output Dockerfile.generated --recipe jvm-balanced
springdocker dockerfile generate --project-root samples/java-spring-docker --recipe spring-aot
springdocker dockerfile generate --project-root samples/java-spring-docker --recipe native-aot
springdocker benchmark generate --project-root samples/java-spring-docker --java-version 25
springdocker benchmark run --project-root samples/java-spring-docker --profile quick --runner-arg --skip-native
springdocker benchmark analyze --project-root samples/java-spring-docker benchmarks/04-jep483-aot-cache/results/raw.csv --format table
springdocker benchmark analyze --project-root samples/java-spring-docker benchmarks/04-jep483-aot-cache/results/raw.csv --format json --output benchmarks/04-jep483-aot-cache/results/summary.json
springdocker benchmark analyze --project-root samples/java-spring-docker benchmarks/04-jep483-aot-cache/results/raw.csv --fail-on-success-rate-below 95
springdocker benchmark analyze --project-root samples/java-spring-docker benchmarks/04-jep483-aot-cache/results/raw.csv --baseline benchmarks/04-jep483-aot-cache/results/baseline.json --fail-on-regression-above 20
Benchmark commands are optional evidence workflows and require benchmark extras.
Use samples/java-spring-docker/benchmarks/reference/v1/summary.json as a versioned baseline example.
Config file (.springdocker.toml)
All command resolvers use precedence:
- CLI flags
.springdocker.toml- defaults
Example:
[project]
build_tool = "maven"
[doctor]
build_tool = "maven"
[dockerfile]
output = "Dockerfile.generated"
java_version = 25
recipe = "jvm-balanced"
must_have_modules_file = "must-have.txt"
legacy_scripts = false
wizard_args = []
[benchmark.generate]
java_version = 25
legacy_scripts = false
[benchmark.run]
profile = "quick"
runner_args = ["--skip-native"]
cpuset_cpus = "0-1"
memory_limit = "2g"
warmup_runs = 1
max_workers = 1
normalized_runtime = true
legacy_scripts = false
When dockerfile.must_have_modules_file is set, springdocker reads modules from that file
(must-have.txt style, one module per line, # comments allowed) and injects them into
the jlink module list for reflection/dynamic-loading edge cases.
Create template config:
springdocker init --project-root samples/java-spring-docker --build-tool gradle
springdocker init --project-root samples/java-spring-docker --build-tool gradle --profile full --print
Legacy compatibility mode
Main command paths are internal and do not require project script files.
To force script wrappers for compatibility:
springdocker dockerfile generate --use-legacy-scripts ...
springdocker benchmark generate --use-legacy-scripts ...
springdocker benchmark run --use-legacy-scripts ...
or set:
export SPRINGDOCKER_LEGACY_SCRIPTS=1
Inspect command
springdocker inspect prints static metadata about the target project:
- detected build tool
- Spring Boot version when present
- Java version when present
- direct dependency coordinates
- generated Dockerfile artifacts in the project root
- basic runtime compatibility guidance
Use --format json for machine-readable output.
Explain command
springdocker explain reads a springdocker-generated Dockerfile and describes the optimizations it contains:
- multi-stage layout
- BuildKit cache usage
- jlink runtime stage
- non-root runtime
- tuned JVM flags
- curated must-have modules
Use --format json when you want stable structured output.
Security hardening
See docs/security-hardening.md for the runtime hardening defaults and recommended docker run flags.
Binary distribution
See docs/distribution.md for packaging notes and sample Homebrew, Scoop, standalone binary, and Docker runtime artifacts.
Multi-architecture builds
See docs/multiarch.md for the Buildx-friendly Dockerfile output and example multi-arch build command.
Compare command
springdocker benchmark compare compares each variant against a required baseline variant and reports deltas.
--baseline-variantselects the variant to compare against.--scenarionarrows the CSV to one scenario.--format jsonproduces machine-readable deltas.
Benchmark run reproducibility
springdocker benchmark run supports deterministic benchmark controls for local or CI runs:
--cpuset-cpuspins benchmark containers to specific CPUs.--memorycaps container memory.--warmup-runsexecutes discarded warmup probes before recording results.--max-workersruns standard scenarios concurrently with controlled worker count.--normalized-runtimeapplies read-only, no-new-privileges, and tmpfs isolation.
These settings can also come from [benchmark.run] in .springdocker.toml.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file springdocker-1.0.3.tar.gz.
File metadata
- Download URL: springdocker-1.0.3.tar.gz
- Upload date:
- Size: 49.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7107cff3864886c3453925be04c8346a46f9fbcface5f5acc65947b7f1178cf8
|
|
| MD5 |
9f7927523b8abae4e49da64d9d719c04
|
|
| BLAKE2b-256 |
df61e994b1da12a661a90fbc8688a5f7e3d804580ac8035dd49b9f10bf0f9176
|
Provenance
The following attestation bundles were made for springdocker-1.0.3.tar.gz:
Publisher:
release.yml on mnafshin/springdocker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
springdocker-1.0.3.tar.gz -
Subject digest:
7107cff3864886c3453925be04c8346a46f9fbcface5f5acc65947b7f1178cf8 - Sigstore transparency entry: 1570681900
- Sigstore integration time:
-
Permalink:
mnafshin/springdocker@0211bba481edf9ccfcab0ab424a6603ae82155e8 -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/mnafshin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0211bba481edf9ccfcab0ab424a6603ae82155e8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file springdocker-1.0.3-py3-none-any.whl.
File metadata
- Download URL: springdocker-1.0.3-py3-none-any.whl
- Upload date:
- Size: 51.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5fdbf99d27ce1dad1f1e5c5642685cdfaabc34302fb94cf3b71bf9c00af36c0
|
|
| MD5 |
f8e064829eb8c2b4884eaa15edec9b2b
|
|
| BLAKE2b-256 |
c9369f2efd898c78d0c78f0bcd8aa69bd57f5ddfe35805333c0fbeba328bdfc0
|
Provenance
The following attestation bundles were made for springdocker-1.0.3-py3-none-any.whl:
Publisher:
release.yml on mnafshin/springdocker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
springdocker-1.0.3-py3-none-any.whl -
Subject digest:
d5fdbf99d27ce1dad1f1e5c5642685cdfaabc34302fb94cf3b71bf9c00af36c0 - Sigstore transparency entry: 1570681928
- Sigstore integration time:
-
Permalink:
mnafshin/springdocker@0211bba481edf9ccfcab0ab424a6603ae82155e8 -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/mnafshin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0211bba481edf9ccfcab0ab424a6603ae82155e8 -
Trigger Event:
push
-
Statement type: