Commit 7df85c66 authored by Victor Nikulshin's avatar Victor Nikulshin

Setup password-less SSH access for drupalizer user

parent fb8be0cc
......@@ -10,6 +10,10 @@ COPY . /opt/sfl
# Create user used by Drupalizer tasks
RUN useradd --home-dir /opt/init --create-home drupalizer --shell /bin/bash && passwd -d drupalizer
# Setup SSH access
RUN mkdir -p /opt/init/.ssh && echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDcJHyU5S4xRP4QyJuBOiS38mrEuwfgOoWoNFQM0gWhJCb2phByO4Xg68f4v0w3FWm2SQQKv3bG5aevTI2ST5n0o/GbcCpdT1udV9uQIxr1+cbXUrecaNPD3WyIxt1Rldtwm7+s0AlwHHk0zKvulyupzPfQGB4Ix0zUfIzt+U45ww==' \
> /opt/init/.ssh/authorized_keys
# Create entrypoint script
RUN echo '#!/bin/bash\n\
\n\
......@@ -28,13 +32,6 @@ fi\n\
exec /bin/sh -c "$*"'\
> /opt/init/init.sh && chmod a+x /opt/init/init.sh
# Setup ssh keys to clone git repo
RUN mv /opt/sfl/conf/id_rsa* /root/.ssh/
RUN cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
RUN chmod 600 /root/.ssh/id_rsa*
RUN exec ssh-agent /bin/bash && ssh-add /root/.ssh/id_rsa
RUN ssh-keyscan gitlab.savoirfairelinux.com >> /root/.ssh/known_hosts
# Create Apache configuration
RUN echo 'ServerName localhost\n\
<VirtualHost *:80>\n\
......
-----BEGIN RSA PRIVATE KEY-----
MIICXgIBAAKBgQDcJHyU5S4xRP4QyJuBOiS38mrEuwfgOoWoNFQM0gWhJCb2phBy
O4Xg68f4v0w3FWm2SQQKv3bG5aevTI2ST5n0o/GbcCpdT1udV9uQIxr1+cbXUrec
aNPD3WyIxt1Rldtwm7+s0AlwHHk0zKvulyupzPfQGB4Ix0zUfIzt+U45wwIDAQAB
AoGBAIFL/NAG+2Z8uyxoZs0ztTVE8Giz4SBVvwLYGTWedSf779aWGrq9Mxiz4zO6
R61iqkAiCnm1krGnWSGguNXiYu0xt3sZww1Oug8hLwCKO87Mz0E8VFbYF/e8Y4VU
87/j4binSBzmTDwPNbKYHkDKTSpAEj8MEysXMwoRYfsupYxhAkEA+5ofK/xV92i0
6b9A/RL+y1d/yuTIzQYSKucqgZe/l/e3uXH0QXcCefXoQYrvxMDMHA5aeViJ54Zi
IWwnY0c+DQJBAN/9lrONTMq+pb3aHBAOBi5r1+R4mE7LwNUA2PycqaTrKt7yT+KM
xdPFE3fWDITNvtLNAAvhx7J7mq7mfCWZMw8CQEhwjmsGouWx4uyt4RM8Rdnb3nJX
Pq0xA0gQ+H8JZuNlMiOVeKLklfTxZSaBzxjR/bJSO6BWapYbbeN7lTeTSn0CQQC+
ORWH7OMfd6M4RYf5ln9nYwzZKhVnLaDZBDxC5CUqOtGQv0ZahuTmwQKUjgLZsgVx
7skwThGTIWevS2x5Xc6/AkEA4iTZC8WOP/MN16bOuFsqHjmhmaONSomQ/pvYgwED
flGK2B3jpsP0UiFBJCCsKEkx+07NBzxY/tMLTkivpLUutA==
-----END RSA PRIVATE KEY-----
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDcJHyU5S4xRP4QyJuBOiS38mrEuwfgOoWoNFQM0gWhJCb2phByO4Xg68f4v0w3FWm2SQQKv3bG5aevTI2ST5n0o/GbcCpdT1udV9uQIxr1+cbXUrecaNPD3WyIxt1Rldtwm7+s0AlwHHk0zKvulyupzPfQGB4Ix0zUfIzt+U45ww==
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment