Containerfile: copiar ssh/known_hosts
All checks were successful
continuous-integration/drone the build was successful
All checks were successful
continuous-integration/drone the build was successful
This commit is contained in:
parent
ed6e1a4758
commit
2548ad883a
2 changed files with 5 additions and 2 deletions
|
@ -8,6 +8,8 @@ RUN echo "https://alpine.sutty.nl/alpine/v3.13/sutty" >> "/etc/apk/repositories"
|
|||
COPY packages /root/packages
|
||||
|
||||
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
|
||||
|
|
|
@ -7,7 +7,8 @@ RUN mkdir -p /home && \
|
|||
--home /home/suttier \
|
||||
suttier && \
|
||||
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
|
||||
USER suttier
|
||||
|
||||
|
|
Loading…
Reference in a new issue