Skip to content
Snippets Groups Projects
Verified Commit 4f0baebf authored by Dan Thomson's avatar Dan Thomson
Browse files

Fix sudoers file permissions

parent f24ca312
No related branches found
Tags 18
No related merge requests found
Pipeline #25102 passed
......@@ -35,9 +35,10 @@ RUN sed -i '/^ip_resolve=/{h;s/=.*/=4/};${x;/^$/{s//ip_resolve=4/;H};x}' /etc/yu
rm -f /tmp/requirements.txt && \
yum -y clean all
COPY /entrypoint.sh /entrypoint.sh
COPY /sudoers /etc/sudoers.d/ansible
RUN chmod 755 /entrypoint.sh
COPY entrypoint.sh /entrypoint.sh
COPY sudoers /etc/sudoers.d/ansible
RUN chmod 755 /entrypoint.sh && chmod 600 /etc/sudoers.d/ansible
RUN groupadd --gid $GID ansible && \
adduser --home /home/ansible --shell /bin/bash --gid $GID --uid $UID ansible
......
......@@ -35,7 +35,7 @@ RUN sed -i '/^ip_resolve=/{h;s/=.*/=4/};${x;/^$/{s//ip_resolve=4/;H};x}' /etc/yu
COPY entrypoint.sh /entrypoint.sh
COPY sudoers /etc/sudoers.d/ansible
RUN chmod 755 /entrypoint.sh
RUN chmod 755 /entrypoint.sh && chmod 600 /etc/sudoers.d/ansible
RUN groupadd --gid $GID ansible && \
adduser --home /home/ansible --shell /bin/bash --gid $GID --uid $UID ansible
......
......@@ -40,7 +40,7 @@ RUN apt-get -y update && \
COPY entrypoint.sh /entrypoint.sh
COPY sudoers /etc/sudoers.d/ansible
RUN chmod 755 /entrypoint.sh
RUN chmod 755 /entrypoint.sh && chmod 600 /etc/sudoers.d/ansible
RUN addgroup --gid $GID ansible && \
adduser --home /home/ansible --shell /bin/bash --disabled-password --gecos '' --gid $GID --uid $UID ansible
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment