diff options
author | Hans Nilsson <[email protected]> | 2018-01-09 18:25:14 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2018-01-09 18:25:14 +0100 |
commit | 6e8a91b5d3a47e4f1b5be4ce1b213f0175b23062 (patch) | |
tree | a953da3988139333ec90a437ee102a8878e5f935 /lib/ssh/test/ssh_compat_SUITE_data/build_scripts/create-base-image | |
parent | 276117e6322bb7cc299c9e22beec0016a32f7806 (diff) | |
parent | 404424917140bd50896dd9aa5cc7288ea2d7abce (diff) | |
download | otp-6e8a91b5d3a47e4f1b5be4ce1b213f0175b23062.tar.gz otp-6e8a91b5d3a47e4f1b5be4ce1b213f0175b23062.tar.bz2 otp-6e8a91b5d3a47e4f1b5be4ce1b213f0175b23062.zip |
Merge branch 'hans/ssh/docker_compat_tests/OTP-14194' into maint
* hans/ssh/docker_compat_tests/OTP-14194:
ssh: A compatibility testing suite using dockers This suite tests compatibility with different combinations of OpenSSH and OpenSSL. The peer SSH is running in a docker container.
Diffstat (limited to 'lib/ssh/test/ssh_compat_SUITE_data/build_scripts/create-base-image')
-rwxr-xr-x | lib/ssh/test/ssh_compat_SUITE_data/build_scripts/create-base-image | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/ssh/test/ssh_compat_SUITE_data/build_scripts/create-base-image b/lib/ssh/test/ssh_compat_SUITE_data/build_scripts/create-base-image new file mode 100755 index 0000000000..1cb7bf33e1 --- /dev/null +++ b/lib/ssh/test/ssh_compat_SUITE_data/build_scripts/create-base-image @@ -0,0 +1,38 @@ +#!/bin/sh + +UBUNTU_VER=${1:-16.04} + +USER=sshtester +PWD=foobar + +docker build \ + -t ubuntubuildbase \ + --build-arg https_proxy=$HTTPS_PROXY \ + --build-arg http_proxy=$HTTP_PROXY \ + - <<EOF + + FROM ubuntu:$UBUNTU_VER + WORKDIR /buildroot + + # Prepare for installing OpenSSH + RUN apt-get update + RUN apt-get upgrade -y + RUN apt-get -y install apt-utils + RUN apt-get -y install build-essential zlib1g-dev + RUN apt-get -y install sudo iputils-ping tcptraceroute net-tools + RUN apt-get -y install sshpass expect + RUN apt-get -y install libpam0g-dev + + # A user for the tests + RUN (echo $PWD; echo $PWD; echo; echo; echo; echo; echo; echo ) | adduser $USER + RUN adduser $USER sudo + + # Prepare the privsep preauth environment for openssh + RUN mkdir -p /var/empty + RUN chown root:sys /var/empty + RUN chmod 755 /var/empty + RUN groupadd -f sshd + RUN ls /bin/false + RUN id -u sshd 2> /dev/null || useradd -g sshd -c 'sshd privsep' -d /var/empty -s /bin/false sshd + +EOF |