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

Is it possible NO_PROXY be exported to docker service in self-hosted pipelines runner

Hi team,

We are running self-hosted pipelines runners. Recently it is good to see that HTTP_PROXY and HTTPS_PROXY get exported to docker service in self-hosted pipelines runner, which gives us opportunity of simplifying pipelines.yml by not adding HTTP(S)_PROXY for the docker service in pipelines.yml.

In my bitbucket pipeline runner, we have HTTP(S)_PROXY, NO_PROXY, http(s)_proxy, no_proxy environments; and "httpProxy", "httpsProxy" and "noProxy" defined in ~/.docker/config.json; and "-Dhttps.proxyHost=<myproxy>< -Dhttps.proxyPort=<port> -Dhttp.proxyHost=<myproxy> -Dhttp.proxyPort=<port> -Dhttp.nonProxyHosts=<noproxyhosts>" in JAVA_TOOL_OPTIONS env variable. I guess docker service get HTTP(S)_PROXY from one of these settings. 

Unfortunately NO_PROXY isn't exported for some reason, which causes issues for some registry (such as gcr.io) that should not go through proxy.

I was wondering if it's possible to also export NO_PROXY env variable to docker service.

The docker service used to be defined as

definitions:
services:
docker:
image:
- name: mydocker:dind
environment:
HTTP_PROXY: $HTTP_PROXY
HTTPS_PROXY: $HTTP_PROXY
NO_PROXY: $NO_PROXY

Now it can be defined as 

definitions:
services:
docker:
image:
- name: mydocker:dind
environment:
NO_PROXY: $NO_PROXY

Once NO_PROXY is able to be exported to docker service, it can be defined as

definitions:
services:
docker:
image:
- name: mydocker:dind

 

I also wonder if we can define the default docker service image in an environment variable of bitbucket pipelines runner just as CLONE_IMAGE, AUTH_PROXY_IMAGE and PAUSE_IMAGE. Maybe more env variables for default resources that docker service consumes. If this is possible, we don't need to define docker service in the pipelines.yml at all. Our developers would be very happy that they don't have to care about these details so they can focus on their own work.

 

Kind regards,

Aaron

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 27, 2023

Hi Aaron,

Thank you for the feedback.

I went ahead and created a feature request for adding support for the NO_PROXY variable as well:

I would suggest adding your vote to the 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.

Regarding your second request, defining the default docker service image in an environment variable, please allow me to check with the development team and I will get back to you.

Kind regards,
Theodora

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 28, 2023

Hi Aaron,

I discussed with the development team about your second request. The reason we offer the variables PAUSE_IMAGE, AUTH_PROXY_IMAGE and CLONE_IMAGE, is that they cannot be configured in the bitbucket-pipelines.yml file. However, services are under a user's control and they can be configured in the bitbucket-pipelines.yml file, so I'm afraid that there is no plan to implement the configuration of the Docker service with environment variables at the moment.

I went ahead and created a feature request about this in our issue tracker so we can gather interest, and if there is more interest in this feature, our development team may reconsider. Please make sure to add your vote and comment to give it more weight and further express your interest:

Kind regards,
Theodora

Suggest an answer

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

Atlassian Community Events