Skip to content

Docker Run

Actions
Run steps using docker
v2.2.1
Latest
Star (9)

CI Update release version. Public workflows that use this action.

docker-run

GitHub action to run steps using docker

Examples

Using a locally built image

...
    steps:
      - uses: actions/checkout@v2

      - name: Set up QEMU
        uses: docker/[email protected]

      - name: Set up Docker Buildx
        uses: docker/[email protected]

      - name: Build
        uses: docker/build-push-action@v3
        with:
          context: .
          load: true
          push: false
          tags: user/app:latest
      
      - name: Run
        uses: tj-actions/docker-run@v2
        with:
          image: user/app:latest
          name: user-app
          args: |
            echo "Hello World"

Using an image from a registry

...
    steps:
      - uses: actions/checkout@v2
      
      - name: Run ubuntu from dockerhub
        uses: tj-actions/docker-run@v2
        with:
          image: ubuntu:latest  # OR gcr.io/cloud-builders/gradle
          name: ubuntu
          args: |
            echo "Hello World"

Inputs

INPUT TYPE REQUIRED DEFAULT DESCRIPTION
args string false Command to run
image string true Docker image
name string true Container name
options string false Options to pass to docker
run

Outputs

OUTPUT TYPE DESCRIPTION
container-id string Container ID

If you feel generous and want to show some extra appreciation:

Buy me a coffee

Credits

This package was created with Cookiecutter using cookiecutter-action

Report Bugs

Report bugs at https://github.com/tj-actions/docker-run/issues.

If you are reporting a bug, please include:

  • Your operating system name and version.
  • Any details about your workflow that might be helpful in troubleshooting.
  • Detailed steps to reproduce the bug.

Docker Run is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Run steps using docker
v2.2.1
Latest

Docker Run is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.