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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,457,604
Community Members
 
Community Events
176
Community Groups

Pipes in private repository with a port number cannot run on (self-hosted) Bitbucket Runners

We are testing private pipes with self-hosted Bitbucket Runners. I know we can use docker://my-docker-registry/repo:tag to refer to a pipe in a private repository in pipelines. But our internal docker repository has a specified port (non 443) configured, so the pipe reference becomes docker://my-internal-docker-registry: port/repo:tag which introduces an issue while running the pipe. Here is an example:

step:
  script:
  - pipe: docker://my-internal-docker-registry:port/repo:tag

While pipelines runners run the pipe, it runs a `docker container run` command as follows:

docker container run \
--volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \
--volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \
--volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/my-internal-docker-registry:port/repo:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/nmy-internal-docker-registry:port/repo \
--workdir=$(pwd) \
--label=org.bitbucket.pipelines.system=true \
--env=BITBUCKET_STEP_TRIGGERER_UUID="$BITBUCKET_STEP_TRIGGERER_UUID" \
--env=BITBUCKET_REPO_FULL_NAME="$BITBUCKET_REPO_FULL_NAME" \
--env=BITBUCKET_GIT_HTTP_ORIGIN="$BITBUCKET_GIT_HTTP_ORIGIN" \
......
--env=DOCKER_HOST="tcp://host.docker.internal:2375" \
--env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \
--env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/my-internal-docker-registry:port/repo" \
......
--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
my-internal-docker-registry:port/repo

which causes an error because of colon (: between my-internal-docker-registry and the port number) in the path of volume mount:

docker: Error response from daemon: invalid volume specification: '/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/my-internal-docker-registry:port/repo:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/my-internal-docker-registry:port/repo'.
See 'docker run --help'.

 

1 answer

Hi @Aaron.Luo 

We've created a bug for this issue - https://jira.atlassian.com/browse/BCLOUD-21719

Please watch that ticket for updates.

 

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events