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:

    1. GA will run a ubuntu-latest virtual machine with docker engine pre-installed.
    2. It will pull and run cypress/included:10.6.0.
    3. All the steps will run inside the Cypress docker container, not on the Ubuntu machine.

    Is that correct?



  • Yes your understanding is correct. The full documentation is here https://docs.github.com/en/actions/using-jobs/running-jobs-in-a-container




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2