Skip to content

Confused with "runs-on" and "container" options #25534

Answered by ethomson
bek0s asked this question in Actions
Discussion options

You must be logged in to vote

> Why both “runs-on” and “container” are required when I want to run a container, and what exactly does this mean? Let’s say for example that I have “runs-on: ubuntu-latest” and “container: centos-latest”. Does this mean that my requested centos-latest image will run on an ubuntu-latest virtual machine? Why do I even have to specify the host operating system (ubuntu-latest) if I plan to use a container and do everything I want to do there?

Yes, you’re exactly right - that’s what that means.

You need to specify that because the underlying virtual machine dictates the type of containers that you can run.  You need an underlying Windows virtual machine (ie, runs-on: windows-latest) to use Wi…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
1 reply
@ihsansfd
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants