Whenever I try to use a container image in a pool, I get a Unexpected value 'container' error message.
Here's the YAML file that I am attempting to use:
resources:
containers:
- container: pandocContainer
image: seesharprun/content-generation-pandoc:0.1.0
pool:
name: 'Hosted Ubuntu 1604'
container: pandocContainer
steps:
- script: pandoc -v
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
I'll take this one
Try changing to:
resources:
containers:
- container: pandocContainer
image: seesharprun/content-generation-pandoc:0.1.0
pool:
vmImage: 'Ubuntu 16.04' # changed
container: pandocContainer # changed
steps:
- script: pandoc -v
I think what's happening is we see a name we don't recognize, which implies a private pool, and then we don't allow container because we don't have a first-class way to pass a container name to a private pool.
I _think_ this is not correct. We are also facing this problem with this configuration.
resources:
containers:
- container: build
image: microsoft/dotnet:2.1-sdk-alpine
pool:
container: build
vmImage: 'Ubuntu 16.04'
Hmm, OK, let me take another look.
@wesselkranenborg another heads up - containers based on Alpine won't work. We depend on which, bash, and node being in the container. I think Alpine is missing which.
I'm still digging into why the syntax doesn't work, though.
Ah, container is a peer of pool, whereas it was a child of queue. I will update the docs.
Should the alpine limitation be in the docs too?
Yep, adding that too.
Most helpful comment
Should the alpine limitation be in the docs too?