diff --git a/docker-compose.yml b/docker-compose.yml index 982efc6..fa350d6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,9 @@ environment: - JENKINS_SLAVE_SSH_PUBKEY=${JENKINS_SLAVE_SSH_PUBKEY} volumes: - - ./data/slave1/:/home/jenkins/ + - ./data/slave1/home:/home/jenkins/ + #- ./data/slave1/ssh/ssh_host_dsa_key:/etc/ssh/ssh_host_dsa_key + #- ./data/slave1/ssh/ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key tmpfs: - /tmp:rw - /run:rw,size=64m @@ -23,7 +25,9 @@ environment: - JENKINS_SLAVE_SSH_PUBKEY=${JENKINS_SLAVE_SSH_PUBKEY} volumes: - - ./data/slave2/:/home/jenkins/ + - ./data/slave2/home:/home/jenkins/ + #- ./data/slave2/ssh/ssh_host_dsa_key:/etc/ssh/ssh_host_dsa_key + #- ./data/slave2/ssh/ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key tmpfs: - /tmp:rw - /run:rw,size=64m diff --git a/docker/arduino/Dockerfile b/docker/arduino/Dockerfile index a690557..4397953 100644 --- a/docker/arduino/Dockerfile +++ b/docker/arduino/Dockerfile @@ -1,6 +1,11 @@ FROM pgollor/jenkins-slave-ssh LABEL MAINTAINER="Pascal Gollor " +EXPOSE 22 + +# volumes +VOLUME ["/home/jenkins"] + # install new ssh key RUN rm /etc/ssh/ssh_host_rsa_key* /etc/ssh/ssh_host_dsa_key* RUN ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa diff --git a/docker/ssh/Dockerfile b/docker/ssh/Dockerfile index 39199f5..4987d7b 100644 --- a/docker/ssh/Dockerfile +++ b/docker/ssh/Dockerfile @@ -1,7 +1,12 @@ FROM jenkinsci/ssh-slave LABEL MAINTAINER="Pascal Gollor " -## install dependencies +EXPOSE 22 + +# volumes +VOLUME ["/home/jenkins"] + +# install dependencies RUN apt-get -y update \ && apt-get -y upgrade \ && rm -rf /var/lib/apt/lists/* diff --git a/install.sh b/install.sh index eb58321..90d7bf2 100755 --- a/install.sh +++ b/install.sh @@ -16,8 +16,10 @@ fi -mkdir -p $dataDir/slave1 -mkdir -p $dataDir/slave2 +mkdir -p $dataDir/slave1/home +mkdir -p $dataDir/slave1/ssh +mkdir -p $dataDir/slave1/home +mkdir -p $dataDir/slave2/ssh cat << EOF > $configFile # address to bind ssh ports to