I am currently trying to build a bitbucket pipeline which is supposed to run a docker-compose file to test a microservice before deployment. The docker compose file is supposed to build my microservice image and run it.
This all seems to work fine locally, however, when I move things to the pipeline I constantly keep getting this error:
<span>#1 [internal] booting buildkit</span>
<span>#1 pulling image moby/buildkit:buildx-stable-1</span>
<span>#1 pulling image moby/buildkit:buildx-stable-1 2.4s done</span>
<span>#1 creating container buildx_buildkit_default 0.0s done</span>
<span>#1 ERROR: Error response from daemon: authorization denied by plugin pipelines: --privileged=true is not allowed</span>
<span>------</span>
<span>></span> [<span>internal</span>] <span>booting buildkit:</span>
<span>------</span>
<span>Error response from daemon: authorization denied by plugin pipelines:</span> <span>--privileged=true</span> <span>is</span> <span>not</span> <span>allowed</span>
Dockerfile
<span>FROM</span> <span>node:12-alpine</span>
<span>WORKDIR</span> <span>/app/playground</span>
<span>RUN</span> <span>npm</span> <span>install</span> <span>npm@7.1.2</span>
<span>RUN</span> <span>rm</span> <span>-rf</span> <span>/usr/local/lib/node_modules/npm</span>
<span>RUN</span> <span>mv</span> <span>node_modules/npm</span> <span>/usr/local/lib/node_modules/npm</span>
<span>COPY</span> <span>package.json</span> <span>package-lock.json</span> <span>./</span>
<span>RUN</span> <span>npm</span> <span>ci</span>
<span>COPY</span> <span>.</span> <span>.</span>
<span>CMD</span> [ <span>"npm"</span>, <span>"run"</span>, <span>"start"</span> ]
docker-compose.yml
<span>version:</span> <span>"3"</span>
<span>services:</span>
<span>playground:</span>
<span>build:</span> <span>.</span>
<span>ports:</span>
<span>-</span> <span>9111</span><span>:9111</span>
<span>env_file:</span>
<span>-</span> <span>./envs/test.env</span>
I understand that bitbucket pipelines have some mechanism to prevent certain operations from executing for security reasons, but as far as I am aware I am not doing that here.
Any idea of how I could possibly fix this error?