Published 5月 25, 2019 by with 0 comment

1 - 02 - Creating The Docker User Group



By default, command docker only root and docker group can use.
If you don’t want to preface the docker command with sudo, create a Unix group called docker and add users to it. When the Docker daemon starts, it creates a Unix socket accessible by members of the docker group.

To create the docker group and add your user:
1. Create the docker group.
$ sudo groupadd docker



2. Add your user to the docker group.
$ sudo usermod -aG docker $USER



3. Log out and log back in so that your group membership is re-evaluated.
$ exit



4. Verify
$ docker --version




Resource:
1. Manage Docker as a non-root user
https://docs.docker.com/install/linux/linux-postinstall/


最初發表 / 最後更新: 2019.05.25 / 2019.05.25

0 comments:

張貼留言