If your user has a password, then run su - $. In my own case, I had to reboot my ec2 server for it to take effect, my server user had no password. That being said, the following are steps to run Docker without sudo(I'd still like to emphasize, for EC2 servers or any other cloud provider servers,):Īpply the new group membership. If you want to avoid typing sudo whenever you run the docker command, add your username to the docker group. The changes would be effected, but it's not so for servers, you have to reboot the server.Īlso, I'd like to add that it is important you run docker without sudo especially in a Jenkins Job as it would throw errors as seen below. If it's on a local terminal, after following the process, you can close your terminal and come back in. Well, that may have worked for others, but it did not for me. It turns out I had to reboot my server, and not just exit the terminal and ssh back in to the terminal as a lot of articles I came across advised. I ran my docker on an EC2 instance, even after following the commands necessary for me to run docker without using sudo. This made me further troubleshoot to get a solution, this article is about my little experience resolving the issue, most especially if you experience this issue running docker on a server. Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.Enter fullscreen mode Exit fullscreen mode
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |