Skip to main content

Docker Build

Stable

Type: DEVRAMPS:DOCKER:BUILD

Category: build

Version: 1.0.0


Description​

Builds a Docker container image from a Dockerfile.

Builds a Docker container image using the specified Dockerfile and pushes it to ECR. Supports build arguments, custom build contexts, and layer caching for faster builds. The resulting image is available for deployment steps.

Parameters​

Required Parameters​

ParameterTypeDescription
dockerfilestringPath to Dockerfile

Optional Parameters​

ParameterTypeDefaultDescription
build_rootstring-Docker build context directory
argsarray<string>-Build arguments
envobject-Environment variables

Example Usage​

artifacts:
api-image:
type: DEVRAMPS:DOCKER:BUILD
rebuild_when_changed:
- "services/api/**"
params:
dockerfile: ./Dockerfile
build_root: ./services/api
args:
- NODE_ENV=production