I was expecting able to call docker on workspace runner running in K8s, but it showed this error:
bash: docker: command not found
I have verified the runner is Online and below is the pipeline script:
pipelines:
custom:
pipeline:
- step:
name: Step1
size: 4x # default 4gb, 8x for 32gb
runs-on:
- 'self.hosted'
- 'linux'
script:
- echo "This step will run on a self hosted runner with 16 GB of memory.";
- docker --version
- step:
name: Step2
script:
- echo "This step will run on Atlassian's infrastructure as usual.";
image used:
image: docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner
Pipeline:
https://bitbucket.org/acn-ce/temp-hanz/pipelines/results/8
Similar issue, but is not K8s runner:
kubectl -n bitbucket-runner exec runner-vq4rw -c runner -- bash -c "ls /tmp/3d518a01-e540-5a30-836b-98973c55e83a"
docker
runner.log
kubectl -n bitbucket-runner exec runner-vq4rw -c runner -- bash -c "cat /tmp/3d518a01-e540-5a30-836b-98973c55e83a/runner.log"
[2023-07-20 07:38:19,930] Runner version: 1.489
[2023-07-20 07:38:19,976] Runner runtime: linux-docker
[2023-07-20 07:38:22,967] Copying Docker cli to working directory.
[2023-07-20 07:38:23,305] Starting websocket listening to RUNNER_UPDATED events.
[2023-07-20 07:38:23,502] Updating runner status to "ONLINE" and checking for new steps assigned to the runner after 0 seconds and then every 30 seconds.
[2023-07-20 07:38:23,752] Updating runner state to "ONLINE".
[2023-07-20 07:38:53,505] Updating runner state to "ONLINE".
[2023-07-20 07:39:23,505] Updating runner state to "ONLINE".
[2023-07-20 07:39:53,505] Updating runner state to "ONLINE".
. . .
I got it I should specify a dind image:
https://github.com/rewardenv/docker
https://janosmiko.com/blog/2021-09-08-bitbucket-pipelines-runners-in-k8s/
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.