Docker Run
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Run a Docker container from an image or Dockerfile.
Runs a Docker container directly without requiring a GitHub Action wrapper.
The image input uses the docker:// prefix convention (same as GitHub Actions):
Pull from registry (use docker:// prefix):
docker://hello-worlddocker://alpine:latestdocker://ghcr.io/owner/image:tagdocker://docker.io/library/nginx
Build from Dockerfile (no prefix):
Dockerfile./Dockerfile./build/Dockerfile.prod/absolute/path/to/Dockerfile
Inputs
Section titled “Inputs”| Port | Description |
|---|---|
Use docker:// prefix for registry images, or path for Dockerfile. | |
Registry: docker://alpine:latest, docker://ghcr.io/owner/image | |
Dockerfile: Dockerfile, ./build/Dockerfile.prod | |
| Arguments to pass to the container entrypoint. | |
| Override the image’s default entrypoint. | |
Example: ["/bin/sh", "-c"] | |
| Working directory inside the container. | |
For GitHub workflows: defaults to /github/workspace (where the repo is mounted). | |
| Otherwise: uses the image’s default WORKDIR. | |
Volume mounts in the format host_path:container_path or host_path:container_path:ro for read-only. | |
| Docker network to connect the container to (e.g., host, bridge, or a custom network name). | |
| When to pull the image from the registry. | |
| Mount the host’s Docker socket into the container, enabling Docker-in-Docker. | |
| This matches GitHub Actions’ default behavior for container actions. | |
| Disable if the container doesn’t need Docker access. | |
| Additional environment variables for the container. | |
| Workflow/job environment variables are automatically included. | |
Use KEY=VALUE format to add or override variables. | |
Outputs
Section titled “Outputs”| Port | Description |
|---|---|
ID: core/docker-run@v1