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

Is it possible to use WSL as runner ?

Thomas Cangialosi November 30, 2021

Hello

I am testing various things on pipelines to decide whether or not we will use it as CI tool for my company.

I am wondering if it is possible to use WSL as runner for compilation step. 

We have a windows based compilation toolchain which include licenced compiler so it is impossible to switch to linux for now.

WSL seems like a promising way to link bitbucket pipeline runners and our toolchain. 

The problem is that we must specify a docker image for the runner. Is it possible to use WSL as linux environment AND then as docker image for the runner ? 

If not, is it possible to not specify any docker image and run directly the scripts in wsl ?

 

I am not an expert in docker images and continuous integration so maybe there are some things I do not see. Please enlight me :) 

 

Thanks a lot 

 

2 answers

0 votes
Dmitry January 8, 2022

Self-hosted runners work with DockerDesktop on Windows (on WSL), but log files from containers are not available due to another log file location in DockerDesktop (and they are not accessible from WSL runner). I hope this will be fixed.. in some way.

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 7, 2021

Hi Thomas and welcome to the community!

Do you need to run your builds on a Windows host?

If so, we have an Early Access Program for Widnows runners. You can see more details here:

There is a link in that post to sign up if you'd be interested and would like to try it.

I'm not sure if it's possible to use WSL as a linux environment for the runner, I would need to test this and check with my team internally, and I'll let you know.

Kind regards,
Theodora

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 18, 2022

Hi @Thomas Cangialosi and @Dmitry,

I have checked with my team and our pipelines runners are designed for an actual Linux system, we have not tested it thoroughly with WSL2.

One issue we have seen, as Dmitry mentioned, is that the container log cannot be found, because the Docker command for starting the runner is meant for Docker that runs on a Linux system, which stores the container log under `/var/lib/docker/containers` directory.

I have created a feature request to add support for runners on WSL:

I would suggest adding your vote in that feature request (by selecting the Vote for this issue link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy here and any updates will be posted in the feature request.

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Dmitry January 18, 2022

Hello! Thank you for answer, that's a good option. I've added my vote.

Like Theodora Boudale likes this
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 21, 2022

You are very welcome @Dmitry !

@Thomas Cangialosi I just realized I didn't address some of your specific questions:

WSL cannot be used as a Docker image for the runner. When you create a runner from Bitbucket website, you are given a docker run command to start the runner which includes the image that must be used (it's docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner:1). It is not possible to not specify any Docker image at all either.

What you can specify is the image that will be used for your builds. After you start a runner, the builds run based on your bitbucket-pipelines.yml file.

For every step in the bitbucket-pipelines.yml file, a new Docker container will start for this step, where the repo is cloned and that step's script commands are executed. If you don't specify any image in the bitbucket-pipelines.yml file, atlassian/default-image:latest will be used for all steps. However, you can specify a different image (e.g. image: openjdk) either at the beginning of the bitbucket-pipelines.yml file, which will be used for all steps, or at the step level.

You can read more here:

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events