Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Use docker-hub-image in Github actions running on Github-hosted runners

Do the Github-hosted runners support direct use of specific docker images available on docker hub?

For example, using the docker image "aergus/latex" on a self-hosted Gitlab-runner is easy as:

job_name:
    image: "aergus/latex"

Is it possible to do something similar on Github-hosted runners?
I.e., instead of using "ubuntu-lastest" or "windows-latest", directly specify a docker image?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can run a job in a container like so:

jobs:
  myjob:
    runs-on: ubuntu-latest
    container:
      image: node:14.16
    steps:
      - run: uname

Note that the runner must be ubuntu.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading