Skip to content

Commit 1604a1a

Browse files
committed
Enable the "sudo no password"
1 parent 15d8c68 commit 1604a1a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

alpine-3.6/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN adduser -s /bin/bash -D docker && \
2727
echo 'docker:docker' | chpasswd
2828

2929
# Add sudo permission.
30-
RUN echo 'docker ALL=(ALL) ALL' >> /etc/sudoers
30+
RUN echo 'docker ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
3131

3232
# Setting ssh public key.
3333
RUN wget https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/files/ssh/id_rsa.pub \

centos-6/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN echo 'root:root' | chpasswd
1616
#RUN sed -i 's/#PermitRootLogin yes/PermitRootLogin yes/' /etc/ssh/sshd_config
1717

1818
# Generate the ssh host keys.
19-
RUN ssh-keygen -q -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
19+
RUN ssh-keygen -q -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
2020

2121
# SSH login fix. Otherwise user is kicked off after login
2222
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd

gentoo/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RUN mkdir /etc/ansible && \
2222
/bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
2323

2424
# install openssh with ansible.
25-
RUN ansible localhost -m portage -a 'package=openssh state=present' -vvvv
25+
RUN ansible localhost -m portage -a 'package=openssh state=present' -vvvv
2626

2727
# Setting the sshd.
2828
RUN mkdir /var/run/sshd

0 commit comments

Comments
 (0)