FROM rastasheep/ubuntu-sshd

RUN apt-get update \
    && apt-get -y install \
        git \
        python \
        python-tox \
        python3 \
        rsync \
    && apt-get clean \
    ;

# 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 ; \
    if [ -n "${http_proxy}" ]; then \
        sed -ri 's/#PermitUserEnvironment no/PermitUserEnvironment yes/g' /etc/ssh/sshd_config; \
        mkdir -p ~/.ssh; \
        echo "http_proxy=${http_proxy}" > ~/.ssh/environment; \
        echo "https_proxy=${https_proxy}" >> ~/.ssh/environment; \
        echo "no_proxy=${no_proxy}" >> ~/.ssh/environment; \
    fi \
    ;
