nerdexam
GitHub

GITHUB-ACTIONS · Question #32

As a developer, you are using a Docker container action in your workflow. What is required for the action to run successfully?

The correct answer is B. The job runs-on must specify a Linux machine with Docker installed.. For a Docker container action to run in a GitHub Actions workflow, the runner must have Docker installed. The runs-on attribute of the job should specify an environment that supports Docker, typically a Linux environment (e.g., ubuntu-latest), since Docker is widely supported and

Create and publish custom GitHub Actions

Question

As a developer, you are using a Docker container action in your workflow. What is required for the action to run successfully?

Options

  • AThe job env must be set to a Linux environment.
  • BThe job runs-on must specify a Linux machine with Docker installed.
  • CThe referenced action must be hosted on Docker Hub.
  • DThe action must be published to the GitHub Marketplace.

How the community answered

(53 responses)
  • A
    4% (2)
  • B
    92% (49)
  • C
    2% (1)
  • D
    2% (1)

Explanation

For a Docker container action to run in a GitHub Actions workflow, the runner must have Docker installed. The runs-on attribute of the job should specify an environment that supports Docker, typically a Linux environment (e.g., ubuntu-latest), since Docker is widely supported and commonly used in Linux-based environments.

Topics

#Docker container action#Linux runner#Docker environment#action requirements

Community Discussion

No community discussion yet for this question.

Full GITHUB-ACTIONS Practice