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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to use a custom image on a self hosted runner as the pipeline Image

Hello,

This is the scenario I have. 
I'm using a linux machine as a self hosted agent. On this agent I have a custom Image that has all my requirements.
Is there a way to specify in the bitbucket-pipeline.yml file to use this image?

For example in github I would do:

runs-on: self-hosted-linux # self hosted agent tag
container: my-custom-image:latest

Container here specifies the image that already exists on self-hosted-linux and tells the pipeline to create a container from that image and use it as an image for the pipeline. 

Is there an equivalent in Bitbucket?
Thanks!

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 19, 2023

Hey Anthony,

Custom docker images used in your build environment are only compatible with Linux Docker runners, it is not supported within Linux Shell environments.

Here is some documentation to assist you further:

Cheers!

- Ben (Bitbucket Cloud Support)

I tried the approach foudn in the 2nd link:

definitions:
  services:
    docker-custom:
      type: docker
      image: private-image (this is the image that is on the self-hosted linux machine)

pipelines:
  default:
      - step:
          name: test
          runs-on:
            - 'self.hosted'
            - 'linux'
          services:
            - docker-custom
          script:
            - python3 main.py

This throws an error saying that I have to authenticate with my Azure Container Registry to use the image... It doesn't use the image that is found on the machine



Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 21, 2023

Hi Anthony,

 

Can you try reference the image like this if it is hosted locally?

 name: localhost:0000/imagename

Where 0000 is the port number and imagename is the name of the image.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

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

Atlassian Community Events