@finalclass BaseImageThe platform’s managed base image, paired with the Dockerfile FROM it goes with.
One class rather than two strings, because the two must agree and used to be able
to disagree: the Python client’s default named the managed base for baseImageArn while
its Dockerfile hardcoded an unrelated registry literal in its FROM, so changing either
left the other pointing somewhere else.
Constructor
Section titled “Constructor”BaseImage(name: str, docker_ref: str, working_dir: str = '')A base a caller built themselves.
working_dir is what docker inspect reports for WorkingDir, and empty means the
image declares none. It is a parameter because a caller with a purpose-built image
is the only one who can say what theirs declares — this client cannot read it
without pulling the manifest. Getting it wrong is what
inherit_workdir refuses on.
Properties
Section titled “Properties”docker_ref
Section titled “docker_ref”docker_ref: strGoes into the Dockerfile FROM — the registry ref measured alongside name.
name: strGoes into baseImageArn — the platform’s managed base, not a registry ref.
working_dir
Section titled “working_dir”working_dir: strMethods
Section titled “Methods”al2023
Section titled “al2023”@staticmethoddef al2023() -> BaseImageThe managed Amazon Linux 2023 base used for measurements in docs/PLATFORM.md.
from_dockerfile
Section titled “from_dockerfile”@staticmethoddef from_dockerfile(dockerfile: str) -> BaseImageThe base a task Dockerfile pairs with: the managed base’s name, so baseImageArn is
unchanged, and the Dockerfile’s first FROM as docker_ref, digest pin included.
build_image refuses a Dockerfile whose first FROM is not the base’s docker_ref;
a base derived from that Dockerfile passes by construction. Raises InvalidArgError
for a Dockerfile with no FROM.
Special methods
Section titled “Special methods”__repr__
Section titled “__repr__”def __repr__() -> strProvenance
Section titled “Provenance”This page is generated from bindings/microvms-py/microvms.pyi by Griffe 2.3.0, run from site/scripts/gen-reference.mjs on every pnpm run sync, so an edit made here is overwritten by the next run.
To change the page, change the doc comment in the binding’s Rust source, then regenerate the declarations with mise run stubs. mise run stubs:check fails when the committed file no longer matches the source.