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.

Suggest an answer

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

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

4,093 views 4 22
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