Skip to content

Commit

Permalink
Merge pull request #10 from uclahs-cds/ts_docker_permissions
Browse files Browse the repository at this point in the history
Updated docker permissions
  • Loading branch information
timothyjsanders authored Mar 5, 2021
2 parents d9b1072 + dbe12e8 commit 74f0e4a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pipeline/config/methods.config
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ params {
// Enable docker
docker {
enabled = true
sudo = params.sge_scheduler // Set to true if run on SGE
runOptions = "-u \$(id -u):\$(id -g)"
runOptions = "\$(for i in `id --real --groups`; do echo -n \"--group-add=\$i \"; done)"
}
sudo = (params.sge_scheduler) ? true : false // Set to true if run on SGE

// Pass user's UID/GID and group IDs to Docker
uid_and_gid = "-u \$(id -u):\$(id -g)"
all_group_ids = "\$(for i in `id --real --groups`; do echo -n \"--group-add=\$i \"; done)"

runOptions = "${uid_and_gid} ${all_group_ids}"
}

0 comments on commit 74f0e4a

Please sign in to comment.