Skip to content

Commit aa585bf

Browse files
CI: optimization (astralinux_1_7) (#410)
1 parent a0a8572 commit aa585bf

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

Dockerfile--astralinux_1_7.tmpl

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,16 @@ ENV LANG=C.UTF-8
9999
100100
RUN chmod 700 /home/test/ && \
101101
mkdir -p /home/test/.ssh && \
102-
chown -R test:test /home/test/.ssh
102+
echo 'Host *' > /home/test/.ssh/config && \
103+
echo ' ControlMaster auto' >> /home/test/.ssh/config && \
104+
echo ' ControlPath /home/test/.ssh/master-%r@%h:%p' >> /home/test/.ssh/config && \
105+
echo ' ControlPersist 30m' >> /home/test/.ssh/config && \
106+
echo ' StrictHostKeyChecking no' >> /home/test/.ssh/config && \
107+
echo ' UserKnownHostsFile /dev/null' >> /home/test/.ssh/config && \
108+
echo ' GSSAPIAuthentication no' >> /home/test/.ssh/config && \
109+
chown -R test:test /home/test/.ssh && \
110+
chmod 700 /home/test/.ssh && \
111+
chmod 600 /home/test/.ssh/config
103112
104113
#
105114
# \"$@\"
@@ -125,11 +134,6 @@ if [ ! -f /home/test/.ssh/id_rsa ]; then \
125134
chmod 600 /home/test/.ssh/authorized_keys; \
126135
fi; \
127136
ls -la /home/test/.ssh/; \
128-
su test -c \"ssh-keyscan -H localhost >> /home/test/.ssh/known_hosts\"; \
129-
su test -c \"ssh-keyscan -H 127.0.0.1 >> /home/test/.ssh/known_hosts\"; \
130-
if [ -n \"${TEST_CFG__REMOTE_HOST:-}\" ]; then \
131-
su test -c \"ssh-keyscan -H ${TEST_CFG__REMOTE_HOST} >> /home/test/.ssh/known_hosts\"; \
132-
fi; \
133137
if [ -n \"${TEST_CFG__REMOTE_SSH_KEY:-}\" ]; then \
134138
cp \"${TEST_CFG__REMOTE_SSH_KEY}\" \"${TEST_CFG__REMOTE_SSH_KEY}_ci\"; \
135139
export TEST_CFG__REMOTE_SSH_KEY=\"${TEST_CFG__REMOTE_SSH_KEY}_ci\"; \

0 commit comments

Comments
 (0)