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

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

pipelines - dockerception - possible to run docker inside docker-compose? Edited

Hey!

Probably a niche use-case, but we're building a service which uses a go docker client in order to check the existence of images in a private registry. Naturally, this needs a docker daemon to be able to run properly. It is currently being tested in Pipelines using docker-compose.

I've tried mounting the docker socket, to be able to use the parent docker daemon (correct me if I'm missing something) using:

volumes:
- "/var/run/docker.sock:/var/run/docker.sock"

in my docker-compose.yml file.

This runs fine locally but gives me permission denied when run in Pipelines. I understand there are constraints around running docker in privileged, mode for security reasons. Does this explicitly include this mounting? Is there anyway around it?

1 answer

1 accepted

0 votes
Answer accepted

Ah this was the document I was looking for to check. Looks like I definitely can't use mounting then.

I've figured out a way around this anyway, using the docker HTTP v2 API allows me to check for images without needed the docker daemon.

Hi @Jonas De Beukelaer 

Can you explain the way you fixed the issue?

@soroush_kazemi since I only needed to check for image existence, I was able to use this API (golang version specifically) https://docs.docker.com/registry/spec/api/ to simply connect to the repo and check the image exists

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,897 views 0 7
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you