Skip to main content

container

The step-level container field controls whether a single step runs inside the workflow's container sandbox or on the host. It is separate from the type: container step type.

Workflow Container Override

When the workflow has a container, eligible type: shell steps run inside it by default. Set container: false to run a shell step on the host:

steps:
- name: host-check
type: shell
container: false
command: echo "this step runs on the host"

Set a step-level container object to run that shell step in its own container configuration:

steps:
- name: isolated
type: shell
container:
image: alpine:latest
shell: /bin/sh
command: uname -a

Container Step Type

The type: container value is a step type for Docker or Podman actions:

steps:
- name: build
type: container
action: build
build:
context: .
dockerfile: Dockerfile
tags:
- app:local

- name: smoke
type: container
action: run
run:
image: app:local
command: uname -a

Supported actions are build, push, run, and inspect. Action-specific configuration lives under the matching build, push, run, or inspect field on the same step object.