Fix permissions when running dev container as non-root user

I wanted to pass `—user` to `docker-compose` up, but that option doesnt exist. To get around this, I had to record the uid on the host (CURRENT_UID), interpolate the variable in tools/docker-compose.yml, and detect that inside the container. I then piggy-backed on the /etc/passwd hack we use for scenarios with unpredictable uids.
This commit is contained in:
Shane McDonald
2018-10-22 19:02:31 -04:00
committed by Ryan Petrello
parent 7df63830ed
commit a361b5da6e
7 changed files with 23 additions and 23 deletions

View File

@@ -2,6 +2,7 @@ version: '2'
services:
# Primary AWX Development Container
awx:
user: ${CURRENT_UID}
image: ${DEV_DOCKER_TAG_BASE}/awx_devel:${TAG}
hostname: awx
environment: