CliFi

Guides

Docker & Containers

Build, test, and deploy containerized applications with CliFi's Docker runner.

Docker runner

CliFi's Docker runner executes tasks inside containers with automatic volume mounts, environment variable propagation, and image caching. It is ideal for build environments that need to be reproducible across developer machines and CI.

clifi.yaml
tasks:
  build:
    runner: docker
    image: node:20-alpine
    workingDir: /workspace
    volumes:
      - .:/workspace
      - /workspace/node_modules
    command: |
      npm ci
      npm run build

Dockerfile generation

CliFi can generate optimized Dockerfiles from your workflow configuration. This keeps your container definitions in sync with your build steps.

bash
clifi docker generate --output Dockerfile

Multi-stage builds

Define separate build and runtime images for production-optimized containers. CliFi handles the intermediate image tagging and layer caching.

Container registry

Push built images to registries with built-in authentication support for Docker Hub, GHCR, ECR, and GCR.

clifi.yaml
tasks:
  push:
    runner: docker
    command: docker push ghcr.io/myorg/myapp:${{ env.TAG }}