Docker task fails to mount volume on Hosted Windows Container #9518
Agent: Hosted Windows Container
I am trying to use the Docker@1 task via yaml to run the jekyll/builder container to build a static website. The container requires mounting a volume to the site source code. I have mounted using the $(Build.SourcesDirectory) built in parameter. However, I get an invalid volume specification error from docker. Here is my full yaml for the task:
steps: - task: Docker@1 displayName: Run Jekyll inputs: command: run imageName: 'jekyll/builder:latest' volumes: $(Build.SourcesDirectory):/srv/jekyll containerCommand: 'jekyll build --future' detached: false
Here is the command and the error I get on Hosted Windows Container:
The exact same yaml step works fine if I simply switch the agent pool to Hosted Ubuntu:
I can run this same container without problem locally on my Windows 10 PC. Linux isn't a viable workaround for my pipeline, because I have another task which is not compatible.
The text was updated successfully, but these errors were encountered: