Search code examples
dockerdockerfileazure-pipelinesdocker-machine

VSTS hosted builds/Docker: "The token '&&' is not a valid statement separator in this version."


On a hosted VSTS windows build, I execute ea batch file executing some Docker related operations. One command is:

docker-compose build

The build runs perfectly until this DockerFile command:

RUN apt-get update -qq && apt-get -y install cron -qq --force-yes && apt-get -y install nginx -qq --force-yes

I get this error:

enter image description here

This error is not seen when building on my developer box.


Solution

  • Found the solution here. The Windows agent is configured to use Windows containers - not Linux containers.