diff --git a/README.md b/README.md index 8316fdc..e5b05b6 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,16 @@ SSH.pm manages machines that accept SSH connection, they may be physical machine Note that Linux is the priority here, as for now SSH.pm doesn't intend to support Windows, and does not guarantee compatibility with OS X, BSD, or another Unix-like opertating systems. **But as soon as we get to alpha phase we *will* add support to other Unix-like systems** + + + +## Build automation + +Execute the build automation script: + +`./build-images` + +All Dockerfiles inside the `docker/` path will be built. + +Note that all Dockerfiles should respect the follow pattern: `Dockerfile.$IMAGE_TAG`. + diff --git a/build-images.sh b/build-images.sh new file mode 100755 index 0000000..f901f88 --- /dev/null +++ b/build-images.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +DOCKER_ROOT=docker +DOCKER_FILES=$DOCKER_ROOT/* + +for docker_file in $DOCKER_FILES +do + IMAGE_TAG=$(echo $docker_file | sed -e "s/docker\/Dockerfile\.//" ) + + echo "Building sshpm-test-server images..." + docker build -t sshpm-test-server:$IMAGE_TAG -f $docker_file $DOCKER_ROOT & + + +done + diff --git a/docker/Dockerfile.ubuntu-1404 b/docker/Dockerfile.ubuntu-1404 index 06b1dc2..99b724a 100644 --- a/docker/Dockerfile.ubuntu-1404 +++ b/docker/Dockerfile.ubuntu-1404 @@ -6,6 +6,9 @@ RUN mkdir /var/run/sshd RUN echo 'root:test_password' | chpasswd RUN sed -i 's/PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config +# Install sudo +RUN apt-get install -y sudo + # SSH login fix. Otherwise user is kicked off after login RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd diff --git a/docker/Dockerfile.ubuntu-1604 b/docker/Dockerfile.ubuntu-1604 index 09db7c8..9891e6b 100644 --- a/docker/Dockerfile.ubuntu-1604 +++ b/docker/Dockerfile.ubuntu-1604 @@ -7,6 +7,9 @@ RUN mkdir /var/run/sshd RUN echo 'root:test_password' | chpasswd RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config +# Install sudo +RUN apt-get install -y sudo + # SSH login fix. Otherwise user is kicked off after login RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd diff --git a/docker/Dockerfile.ubuntu-1610 b/docker/Dockerfile.ubuntu-1610 index df1aa5a..71c5d64 100644 --- a/docker/Dockerfile.ubuntu-1610 +++ b/docker/Dockerfile.ubuntu-1610 @@ -6,6 +6,9 @@ RUN mkdir /var/run/sshd RUN echo 'root:test_password' | chpasswd RUN sed -i 's/PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config +# Install sudo +RUN apt-get install -y sudo + # SSH login fix. Otherwise user is kicked off after login RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd diff --git a/docker/Dockerfile.ubuntu-1704 b/docker/Dockerfile.ubuntu-1704 index 7158548..69c56ff 100644 --- a/docker/Dockerfile.ubuntu-1704 +++ b/docker/Dockerfile.ubuntu-1704 @@ -6,6 +6,9 @@ RUN mkdir /var/run/sshd RUN echo 'root:test_password' | chpasswd RUN sed -i 's/PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config +# Install sudo +RUN apt-get install -y sudo + # SSH login fix. Otherwise user is kicked off after login RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd