Docker Build
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
| Parameter | Type | Description |
|---|---|---|
dockerfile | string | Path to Dockerfile |
Optional Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
build_root | string | - | Docker build context directory |
args | array<string> | - | Build arguments |
env | object | - | 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