How to set docker --insecure-registry property as part of Bitbucket pipeline job

Hi to all,

I am running pipeline job which push docker image to our private docker registry.

Docker registry is not running over https and to push image from my local computer I add this line

{
"insecure-registries": ["myIP:myPORT"]
}

to "etc/docker/deamon.json file and it works how I expect.

But when run pipeline job I got this error

Error response from daemon: Get https://myIP:myPORT/v1/users/: http: server gave HTTP response to HTTPS client

This is our bitbucket-pipelines.yaml file

 

image: maven:3.3.9-jdk-8
options:
  docker: true
pipelines:
  branches:
    master:
    - step:
        script:
          - mvn -s settings.xml clean deploy # -B batch mode makes Maven less verbose
    develop:
    - step:
        script:
          - mvn -s settings.xml clean deploy # -B batch mode makes Maven less verbose
          - docker login myIP:myPORT -u $NEXUS_USERNAME -p $NEXUS_PASSWORD
          - docker build -t myService:1.0-SNAPSHOT .
          - docker push myIP:myPORT/myService:1.0-SNAPSHOT

 How can I set insecure-registries property?

 

Thanks

BR.

Oliver

1 answer

0 vote

Up

Hi to all,

i have exactly the same question. I make a rapid test to etablish a connexion between a pipeline bitbucket and a private docker registry. 

That work with different machine if i had --insecure option and i try to do the same with bitbucket.

It's possible?

Thanks. BR

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

26,568 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you