Base Image Smoke Test
Base Image Smoke TestWhat Is a Base Image Smoke Test?
A base image smoke test is a short automated check confirming that an application still builds, starts, and performs its core function after its base image has been replaced. It is deliberately shallow, aiming to catch the obvious breakage a base image swap causes rather than to validate the application comprehensively. Its purpose is to make the swap routine rather than risky.
The need arises because replacing a base image changes the environment beneath software that was not otherwise modified. The application code is identical and the dependencies are identical, yet a missing shared library, an absent shell, or a different default user can stop it working.
Teams adopting hardened or minimal images meet this immediately, and the ones that adopt successfully are usually the ones that automated the check early rather than testing by hand each time.
What a Base Image Smoke Test Covers
The useful version is small enough to run on every build and broad enough to catch the common failures.
- The build completes, which catches missing compilers, headers, and package managers the previous base happened to provide.
- The container starts and stays running, catching missing shared libraries, absent entry point interpreters, and permission failures.
- A health or readiness endpoint responds, confirming the process initialized rather than merely launching.
- One real transaction succeeds end to end, exercising outbound TLS, DNS, and filesystem access in a single pass.
The fourth check catches the largest share of base image problems, because certificate bundles, timezone data, and resolver behavior are exactly what minimal images omit and exactly what ordinary unit tests never touch.
What a Smoke Test Will Not Catch
It is a gate rather than an assurance. Passing one means the obvious things work, and nothing beyond that.
Shallow by design means shallow in coverage. Problems appearing under load, after hours of uptime, in particular locales, or only on one CPU architecture will pass a smoke test cleanly and surface later in an environment that matters more.
What stays outside its scope:
- Performance regressions, since a different C library or compiler can change throughput without changing correctness.
- Locale and timezone behavior, unless the transaction under test exercises them deliberately.
- Architecture-specific failures, because a test run on one platform says nothing about another variant of the same tag.
- Long-running resource behavior, such as memory growth or file descriptor exhaustion that needs hours to appear.
Those belong to the stages that follow. The smoke test earns its place by failing fast and cheaply, leaving deeper problems to a staging environment with time to find them.
How to Run Base Image Smoke Tests in Production Environments
Automate it once per service and run it on every base image change rather than only during a migration.
- Run the test on every base image bump, including automated ones, so a routine rebuild that breaks something is caught the same day.
- Keep the whole test under a few minutes, because a slow gate gets skipped under delivery pressure.
- Test the exact image you will deploy, by digest, rather than a locally rebuilt approximation of it.
- Cover every architecture you run, since variants of one tag can differ in contents and in behavior.
- Record the result as deployment evidence, so the compatibility claim behind a change is documented rather than remembered.
The first control turns this from a migration exercise into standing protection. Base images change continuously once a provider is rebuilding them, and each rebuild is a small change to your runtime.
How Hardened Container Images Change the Testing Burden
Minimal images fail in a narrow and predictable set of ways, which is what makes a short test effective against them. Missing certificates, no shell, non-root defaults, and absent timezone data account for most of what goes wrong.
Because the failure modes stay consistent, a smoke test written once tends to work across an estate rather than needing bespoke checks for every service.
Echo's hardened container images are offered in variants carrying different amounts of userland, so a test failing on the smallest variant usually passes on a slightly larger one without abandoning the migration.
FAQs
How is a smoke test different from my existing test suite?
Scope and intent. A unit or integration suite validates application logic, usually with dependencies stubbed, and would pass even if the runtime environment were broken. A smoke test validates the environment by running the real artifact inside a real container. The two catch entirely different classes of failure. Run both, since neither substitutes for the other.
What should the single transaction in a smoke test exercise?
Pick the path touching the most infrastructure: an outbound HTTPS call, a database query, and a file write if the service performs one. Those three cover certificates, resolver behavior, and filesystem permissions, which are the usual casualties of a base image change. Breadth matters more than depth here. Keep it to one request, end to end.
Should the smoke test block a deployment?
Yes, for base image changes specifically. The whole point is making the swap routine, which requires that a failure stops the change automatically rather than depending on somebody reading a report. Keep it fast enough that blocking stays uncontroversial, and route failures to the team owning the service. A warning nobody reads is not a gate.
Why does my container start and then exit immediately?
Most often a missing entry point interpreter or a permission problem. Minimal images frequently have no shell, so a script entry point fails, and many run as a non-root user by default, so a process writing to a previously writable path is refused. Check the exit code first. Container logs usually name the missing file.
Do I need a separate smoke test per architecture?
You need the same test executed per architecture rather than a different test for each. Variants of a multi-architecture tag can differ in package versions and in behavior, so a pass on one platform does not establish a pass on another. Run the identical check against each variant. One test definition, executed several times.







