How does Github Actions work with docker containers?
-
Consider this GA workflow:
name: My GA Workflow
on: push
jobs:
myJobName:
runs-on: ubuntu-latest
container: cypress/included:10.6.0
steps:
- name: Ensure tools are available
shell: bash
run: |
apt-get update &&
apt-get install -y unzip zstd netcat# and so on...
I would like to have a crystal clear understanding what happens there. Currently I reckon:
- GA will run a
ubuntu-latest
virtual machine with docker engine pre-installed. - It will pull and run
cypress/included:10.6.0
. - All the steps will run inside the Cypress docker container, not on the Ubuntu machine.
Is that correct?
- GA will run a
-
Yes your understanding is correct. The full documentation is here https://docs.github.com/en/actions/using-jobs/running-jobs-in-a-container