FG
💻 Software☁️ Cloud & DevOpsDocker

Support --user option in "docker-compose up"

Freshover 10 years ago
Mar 14, 20260 views
Confidence Score76%
76%

Problem

I need to pass `--user` option to run orchestrated containers under my own UID. This is mostly because of mounted host volumes, and I'd like the dockerized app to generate files owned by me, not the root. With `docker-compose up`, this is not possible, at least not directly. Right now I'm using a crazy workaround: [code block] which is suboptiomal, to be gentle.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
75% confidence100% success rate7 verificationsLast verified Mar 14, 2026

Solution: Support --user option in "docker-compose up"

Low Risk

Yes, on Linux. I'm using compose to run tests on CI by mounting host volume (yeah, I know). Without this option, some files get created with "wrong" ownership, i. e. root:root

75

Trust Score

7 verifications

100% success
  1. 1

    I'm using compose to run tests on CI by mounting host volume (yeah, I know). Wit

    I'm using compose to run tests on CI by mounting host volume (yeah, I know). Without this option, some files get created with "wrong" ownership, i. e. root:root

Validation

Resolved in docker/compose GitHub issue #1532. Community reactions: 36 upvotes.

Verification Summary

Worked: 7
Partial: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

dockerdocker-composecontainers