Reputation: 17491
I want my Docker image to have a non-root user that can perform root/sudo commands.
How do I specify that in my Dockerfile?
Upvotes: 1
Views: 172
Reputation: 17491
I found out by myself:
RUN useradd -m <username>
RUN sudo usermod -a -G sudo <username>
RUN echo "<username>:<password>"|chpasswd
Upvotes: 1