Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

The Docker feature is not supported on this self-hosted runner's platform

Ramesh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 18, 2023

Hi 

I am running a self-hosted, linux-shell runner on my instance. when i tried to build docker images+containers for my app from my bitbucket pipeline I am facing the problem that "The Docker feature is not supported on this self-hosted runner's platform.". The error screenshot is attached below.

Screenshot from 2023-04-16 21-47-20-1.png

Below is my bitbucket-pipelines.yml

definitions:
services:
docker:
imagedocker:dind
pipelines:
default:
step:
name'Step1'
runs-on:
self.hosted
linux.shell
script:
echo "1.This step of pipeline will run on a self hosted runner.";
docker version
echo "2.This step of dtf-chain-handler pipeline, has successfully executed.";
services:
docker

I am facing big challenges of running docker commands from my self-hosted, linux-shell runner. I have been looking for solution for this problem for several days, but I could not get any solution online even not in Atlassian docs. Please provide the solution for this as soon as possible.
And also let me know if anyone has a solution/example to deploy the application on a instance where the runner is running without having separate instance to deploy or a separate deploy steps.
Thanks,
Ramesh

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 18, 2023

Hello @Ramesh ,

Welcome to Atlassian Community!

The Linux Shell runners don't currently support using service containers, such as the docker service (see Linux Shell Runners - Unsupported Features).

As the Linux shell runners run directly in a terminal session, if you would like to run docker commands as part of your build you will just need to make sure that docker is installed in the host machine, and it's not necessary to define the services section in the YML file, as the Linux shell runner will use the docker executable from the host itself. Following is an example YML file : 

pipelines:
  default:
    - step:
        name: 'Step1'
        runs-on:
        - self.hosted
        - linux.shell
        script:
        - echo "1.This step of pipeline will run on a self hosted runner."
        - docker version
        - echo "2.This step of dtf-chain-handler pipeline, has successfully executed."

Another option, in case you want support for service containers in your build, is to use Linux Docker runners, where the runner will run in a containerized environment. If you choose to use Linux docker runners and want to run docker commands in your build, then you will need to specify the services: - docker in the step, as you were doing in the example you have shared.

Hope that helps to clarify your questions!

Thank you, @Ramesh !

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events