Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Using docker-compose in a pipeline: how to define artifacts, and how to use docker cache?

Hi there,

I'm looking to run a Cypress E2E test suite in a pipeline by spinning up several services using docker-compose. I'm coming across several roadblocks:

The docker cache does not seem to be working. I'm running a pipeline with a custom image, here is the Dockerfile:

FROM node:14-alpine
RUN apk add --update docker docker-compose openrc gettext zip
RUN rc-update add docker boot

 I suspect that I should perhaps not be booting up docker in this container, though I'm not sure how to "hook into" the built-in docker service provided? Since docker-compose requires the docker daemon to be running, how can it be made aware of the built-in daemon? A common strategy to use a hosts docker daemon with docker-in-docker use-cases is to create a volume for /var/run/docker.sock, though I'm aware that the use of volumes are restricted in pipelines.

This brings me to my other roadblock. When a Cypress test fails, it generates screenshot and video files to help with debugging. I'd like to archive these files, though they're being generated in the Cypress container, and again I'm not able to create volumes for them, so I'm not sure how to have them archived.

Are there work-arounds to these roadblocks, or are there simply hard limitations to using this docker-in-docker approach? Any help would be greatly appreciated

0 answers

Suggest an answer

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

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

239 views 2 5
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