How to run sudo visudo in a Dockerfile?

26 views Asked by At

I am creating a Dockerfile using the centos:7 base image. I need to edit the file at etc/sudoers and append NOPASSWD privileges to it for a new consul user and some groups.

I have looked up in forums that its better to use sudo visudo while editing the sudoers file instead of using cat? However, I am still a beginner and any pointers regarding how that can be written in a Dockerfile would be helpful.

0

There are 0 answers