Forums

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

Is a pipe running in a Docker image without root user supported?

Julien HENRY October 8, 2024

Hi,

 

We tried to change our pipe to use a base Docker image where the user is a regular user, not root.

As a result, the pipeline failed when trying to write to $BITBUCKET_PIPE_STORAGE_DIR:

tee: /opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan/sonarcloud-scan.log: Permission denied

So we had to revert to root.

Is this even possible to run a pipe with a non-root user? Or is it part of Bitbucket Pipes guidelines that Docker images should be run as root?

I am fine with the second option, but would it be possible to explicitly document it, as GitHub does for GitHub Actionsto stop users from challenging us for not following Docker best practices?

 

FYI I added some debug logs to my pipe, and here is the result of ls -ad $BITBUCKET_PIPE_STORAGE_DIR:

drwxr-xr-x 2 root root 4096 Oct 3 14:09 /opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan

You can see that only root can write in this folder.

1 answer

1 vote
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 11, 2024

Hi @Julien HENRY . Thanks for your question.

We will discuss this with Bitbucket Pipelines team  and notify you.

Regards, Igor

Shlomo Heigh
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!
March 10, 2025

How is this still not fixed? Nothing should require containers to run in root in today's security climate.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events