I have a CI server in an AWS cloud which hosts our BitBucket.
The runners are on a separate EC2 instance.
The code we are using is Rust.
I installed the runners on a windows EC2 and everything is fine.
I follow the instructions to install the runners on a Linux machine (Ubuntu) and the runners cannot find Cargo.
When I connect to the machine I can run it manually from any directory so it should be viewable by the build runner.
Is this because the docker image cannot see outside of the docker container so I need to add lines to the docker image to install Rust? If so, how do I do that?
Linux runners cannot access files and programs from the host system.
With Linux runners, you have the Docker container of the runner running on your system.
Every time a build is triggered for that runner, a separate Docker container starts (the build container) where the build runs, and then it gets destroyed when the build finishes.
The build container uses the Docker image you have defined in bitbucket-pipelines.yml. If you don't specify a Docker image to use as your build environment in bitbucket-pipelines.yml, then the default one is used.
If you need tools that are not available in the default image, then
You can check below the resources we have about creating a custom Docker image:
You are very welcome, I'm glad to have helped!
Any commands you have in the script of a step in bitbucket-pipelines.yml will run every time a build runs.
It is not possible to configure any build details when starting the runner.
The other solution is to create a custom Docker image and specify that image in bitbucket-pipelines.yml.
You can place any commands that install tools in the Dockerfile of your custom Docker image, then build the image and push it to Docker Hub, AWS, GCP, Azure, or a self-hosted registry accessible on the internet, so you can use it in bitbucket-pipelines.yml.