網頁

2015年8月30日 星期日

Docker 1.7.1 --- How to enable Non-root Users to run Docker command

Since Docker version 0.5.3, the docker daemon binds to a Unix socket instead of a TCP port. By default that Unix socket is owned by the user root and other users can access it with sudo.
If you would like to use Docker as a non-root user, you should now consider adding your user to the "docker" group because the docker group is equivalent to the root user.

To create the docker group and add a user or users to by using the sudo usermod -aG docker davidwa command.
To remember that you will have to log out and log back in to ensure this user is running with the correct permissions.

To verify its mechanism works by running docker with sudo as follows:
So do that we can execute Docker command without root right now.

沒有留言:

張貼留言

Since 2010 Design by Davidwa
©Copyright Davidwa Inc. All rights reserved.