Try another way to add group
This commit is contained in:
parent
5b8d4b8e67
commit
264247a9b8
|
@ -73,10 +73,11 @@ add_user_to_docker_group() {
|
|||
sudo groupadd docker
|
||||
sudo gpasswd -a "${ADMIN_USERNAME}" docker
|
||||
# based on https://superuser.com/a/345051
|
||||
orig_group_id=$(id -gn)
|
||||
echo "===== orig_group_id = ${orig_group_id}"
|
||||
newgrp docker
|
||||
newgrp "${orig_group_id}"
|
||||
#orig_group_id=$(id -gn)
|
||||
#echo "===== orig_group_id = ${orig_group_id}"
|
||||
#newgrp docker
|
||||
#newgrp "${orig_group_id}"
|
||||
exec sg docker newgrp `id -gn`
|
||||
echo "===== Groups: "
|
||||
groups
|
||||
echo "<===== add_user_to_docker_group"
|
||||
|
|
Loading…
Reference in New Issue