I'm running a self-hosted runner and whenever I try to enable docker support for individual steps, or for all steps via `options: docker: true`, the pipeline fails in the step set up. The pipeline dashboard doesn't include any helpful error logs. If I log into my runner and check the stdout, there is a always line `[2021-07-31 07:40:08,139] Container has state (exitCode: Some(4), OOMKilled Some(false))`.
Here is my bitbucket-pipelines.yml:
image:
name: gcr.io/novo00/bitbucket-pipelines:latest
username: _json_key
password: '$CREDS'
options:
docker: true
pipelines:
branches:
master:
- step:
runs-on:
- self.hosted
script:
- echo "Starting script"
- build/bitbucket_pipelines/version.sh
- step:
runs-on:
- self.hosted
script:
- echo "Starting script"
- build/bitbucket_pipelines/build.sh
- step:
runs-on:
- self.hosted
script:
- echo "Starting script"
- build/bitbucket_pipelines/deploy_no_traffic.sh
This fails during set up of step 1. If I remove `options: docker: true` and put it as a service to step 2 (where it is actually needed), step 1 runs fine, and the pipeline fails during set up of step 2.
As instructed, I have the docker socket and containers dir mounted properly: `-v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/containers:/var/lib/docker/containers:ro`
Is this an issue? Or am I doing something wrong?
EDIT: This pipeline works in Bitbucket's runners. It breaks when self-hosted.