Azure-devops-docs: Unexpected value 'container'

Created on 10 Sep 2018  Â·  9Comments  Â·  Source: MicrosoftDocs/azure-devops-docs

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

Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Most helpful comment

Should the alpine limitation be in the docs too?

All 9 comments

Here's the build result:

image

It's a public repository at https://dev.azure.com/seesharprun/Demo.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anlatsko picture anlatsko  Â·  3Comments

cijujoseph picture cijujoseph  Â·  3Comments

dtamai picture dtamai  Â·  3Comments

michhar picture michhar  Â·  3Comments

letmaik picture letmaik  Â·  3Comments