LinuxCommandLibrary

podman-build

TLDR

Build from Containerfile

$ podman build -t [image:tag] [path]
copy
Build with specific file
$ podman build -f [Dockerfile] -t [image] [path]
copy
Build without cache
$ podman build --no-cache -t [image] [path]
copy
Build with build args
$ podman build --build-arg [KEY=value] -t [image] [path]
copy

SYNOPSIS

podman build [options] path

DESCRIPTION

podman build builds container images from Containerfiles. Docker-compatible.
The tool creates OCI images. Supports multi-stage builds.
podman build creates images.

PARAMETERS

PATH

Build context directory.
-t, --tag NAME
Image name and tag.
-f, --file FILE
Containerfile path.
--no-cache
Don't use build cache.
--build-arg ARG
Build-time variables.
--pull
Always pull base image.
--squash
Squash layers.

CAVEATS

Uses Buildah under the hood. Docker build compatible.

HISTORY

podman build uses Buildah for OCI-compliant image building.

SEE ALSO

Copied to clipboard