Containerfile: copiar ssh/known_hosts
All checks were successful
continuous-integration/drone the build was successful

This commit is contained in:
Cat /dev/Nulo 2021-09-28 15:42:07 -03:00
parent ed6e1a4758
commit 2548ad883a
2 changed files with 5 additions and 2 deletions

View file

@ -8,6 +8,8 @@ RUN echo "https://alpine.sutty.nl/alpine/v3.13/sutty" >> "/etc/apk/repositories"
COPY packages /root/packages COPY packages /root/packages
RUN apk add --no-cache $(cat "/root/packages" | tr "\n" " ") RUN apk add --no-cache $(cat "/root/packages" | tr "\n" " ")
RUN sed -re "s/#(@platforms = )/\1/" -i "/usr/lib/ruby/2.7.0/rubygems.rb" RUN sed -re "s/#(@platforms = )/\1/" -i "/usr/lib/ruby/2.7.0/rubygems.rb" && \
mkdir -m 700 -p "~/.ssh"
COPY ssh/known_hosts /root/.ssh/known_hosts
COPY .gemrc /root/.gemrc COPY .gemrc /root/.gemrc

View file

@ -7,7 +7,8 @@ RUN mkdir -p /home && \
--home /home/suttier \ --home /home/suttier \
suttier && \ suttier && \
cp /root/.gemrc /home/suttier/.gemrc && \ cp /root/.gemrc /home/suttier/.gemrc && \
chown suttier:suttier /home/suttier/.gemrc && \ cp -r /root/.ssh /home/suttier/.ssh && \
chown -R suttier:suttier /home/suttier/ && \
echo "suttier ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers echo "suttier ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER suttier USER suttier