Dockerfile, on your infrastructure, and pushes it to your infrastructure’s registry: Artifact Registry on Google Cloud or Amazon ECR on AWS.
What you need
- A
Dockerfilefor each service. Inframan builds only from Dockerfiles. pathandbuild.dockerfileininframan.yaml, if the defaults don’t fit.pathis the build context, anddockerfileis relative to it.
linux/amd64.
Where builds run
You choose when you create the infrastructure:
A build is stopped if it runs for longer than 30 minutes.
Builds that don’t need to happen
Inframan skips work that wouldn’t change anything:- Already built: if this commit was already built for the service, its image is reused.
- Nothing changed: if none of the service’s
watch_paths, or nothing in its build context, changed since its last image, the image is reused. In a monorepo this means a push that touches one service rebuilds only that service. - Shared builds: services with an identical build, the same context, Dockerfile and build arguments, are built once and share the image.
inframan.yaml
Build arguments and secrets
- Every plain variable from the service’s
envand its env groups is passed to the build as a--build-arg. Declare it withARGin yourDockerfileto use it. - Secrets marked for builds are mounted with BuildKit’s secret mount, so they never end up in an image layer. See Secrets at build time.
How your code is fetched
Inframan clones the pushed commit’s branch with a shallow, single-branch clone. Git submodules and Git LFS files aren’t fetched, so vendor what the build needs or fetch it in yourDockerfile.
Before the build
To run tests or linters before an image is built, addpre_build steps to a pipeline. A failed step stops the release before anything is built.