Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to create files from docker image running inside the pipeline

Jeroen Benckhuijsen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 29, 2025

Hi,

 

I have a setup where I run some docker images from within the Bitbucket Pipelines build (they are testcontainers, i.e. the docker images are started from within the pipeline, sort of docker-in-docker setup).

One of the images I'm using is mounting a subdirectory of BITBUCKET_CLONE_DIR inside the container and tries to create a file there. This fails, causing the whole build to fail.

I've come across this discussion: https://community.atlassian.com/forums/Bitbucket-questions/Bitbucket-pipelines-how-can-I-map-a-volume-to-docker-to-expose/qaq-p/686951

However, that only discusses creating directories from withint such a docker image, not files. 

I've created a simple test Dockerfile to verify this behavior and creating files indeed seems to fail:

 

FROM node:20

USER 0

RUN mkdir /srv/firebase
RUN mkdir /srv/firebase/kantoordag-next

VOLUME /srv/firebase/kantoordag-next
WORKDIR /srv/firebase/kantoordag-next

ADD testme.sh /srv/testme.sh
RUN chmod +x /srv/testme.sh

CMD /srv/testme.sh

 

And testme.sh is:

#!/bin/sh

who

ls -la /srv/firebase/kantoordag-next
ls -la /srv/firebase/kantoordag-next/node_modules
ls -la /srv/firebase/kantoordag-next/node_modules/.vite-temp

touch /srv/firebase/kantoordag-next/node_modules/.vite-temp/testme || echo "Failed"

echo "Testme creation:"
ls -la /srv/firebase/kantoordag-next/node_modules/.vite-temp

 

1 answer

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 30, 2025

Hey @Jeroen Benckhuijsen 

Welcome to the community!

I need to see your pipeline YML to understand how you're mounting the volume and identify the failure. Since this is public, I recommend raising a Support ticket on our Support portal for further investigation.

Regards,
Syahrul

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events