<p>There are two aspects:</p>
<ol>
<li>can github actions run containers?</li>
<li>Can github actions run container <em>like jenkins</em></li>
</ol>
<p>To answer the former, by default Github actions do run in containers. From the <a href="https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions#the-components-of-github-actions" rel="nofollow noreferrer">docs</a>:</p>
<blockquote>
<p>Your workflow contains one or more jobs which can run in sequential order or in parallel. Each job will run inside its own virtual machine runner, <strong>or inside a container</strong>, and has one or more steps that either run a script that you define or run an action, which is a reusable extension that can simplify your workflow.</p>
</blockquote>
<p>(emphasis my own)</p>
<p>There is also a <a href="https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action" rel="nofollow noreferrer">dedicated page for creating container-based runners</a></p>
<p>For the latter part of the question, it's not quite clear what you mean by &quot;like Jenkins&quot;, but the <a href="https://docs.github.com/en/actions/migrating-to-github-actions/migrating-from-jenkins-to-github-actions" rel="nofollow noreferrer">Github Actions guide</a> should provide the relevant context.</p>

CC BY-SA 4.0
2022-03-04T08:46:27.003Z
2022-03-04T08:46:27.003Z
Bruce Becker
<p>Is it possible to run github actions inside docker container like jenkins?</p>

<docker><github-actions>
Can we run github actions inside a docker container?
user48951
# Can we run github actions inside a docker container?

(Asked by: username_0 on 2022-03-03)

Is it possible to run github actions inside docker container like jenkins?

**Tags:** docker, github-actions


---

## 1 answers

### Answer by username_1 on 2022-03-04. Score: 1 | Accepted answer

There are two aspects:

1. can github actions run containers?
2. Can github actions run container *like jenkins*

To answer the former, by default Github actions do run in containers. From the [docs](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions#the-components-of-github-actions):

> Your workflow contains one or more jobs which can run in sequential order or in parallel. Each job will run inside its own virtual machine runner, **or inside a container**, and has one or more steps that either run a script that you define or run an action, which is a reusable extension that can simplify your workflow.

(emphasis my own)

There is also a [dedicated page for creating container-based runners](https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action)

For the latter part of the question, it's not quite clear what you mean by "like Jenkins", but the [Github Actions guide](https://docs.github.com/en/actions/migrating-to-github-actions/migrating-from-jenkins-to-github-actions) should provide the relevant context.


---

