https://medium.com/redbubble/running-a-docker-container-as-a-non-root-user-7d2e00f8ee15
docker run -u
for compose, run the following with CURRENT_UID=$(id -u):$(id -g) docker-compose up
:
version: '3.3'
services:
rspec:
image: my-docker/my-build-environment:latest
environment:
- RAILS_ENV=test
command: ["make", "assets"]
# THIS BIT!!!1!
user: ${CURRENT_UID}
volumes:
- .:/app