97aa27080f
So that we can better test functions related to ssh connectivity, add a static node to the functional test. Change-Id: I3dfdaca0b4e5dbfb35e4a645c7bcb56e0eec88c2
30 lines
995 B
Docker
30 lines
995 B
Docker
FROM ubuntu:20.04
|
|
|
|
RUN apt-get update \
|
|
&& DEBIAN_FRONTEND="noninteractive" apt-get -y install \
|
|
git \
|
|
openssh-server \
|
|
rsync \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# If proxy environment variables supplied during build allow pass through via
|
|
# ~/.ssh/environment, as the test env likely will require these set for any
|
|
# job launched on the node to be capable of internet access.
|
|
RUN set -e ; \
|
|
mkdir /var/run/sshd ; \
|
|
mkdir -p -m 0700 ~/.ssh; \
|
|
if [ -n "${http_proxy}" ]; then \
|
|
sed -ri 's/#PermitUserEnvironment no/PermitUserEnvironment yes/g' /etc/ssh/sshd_config; \
|
|
echo "http_proxy=${http_proxy}" > ~/.ssh/environment; \
|
|
echo "https_proxy=${https_proxy}" >> ~/.ssh/environment; \
|
|
echo "no_proxy=${no_proxy}" >> ~/.ssh/environment; \
|
|
fi \
|
|
;
|
|
|
|
COPY --chown=root:root ./ssh_host_ed25519_key /etc/ssh/ssh_host_ed25519_key
|
|
RUN chmod 0600 /etc/ssh/ssh_host_ed25519_key
|
|
|
|
EXPOSE 22
|
|
|
|
ENTRYPOINT ["/usr/sbin/sshd", "-D" ]
|