[JCLOUDS-1010] use a lightweight image as a base for Docker build test

Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/9271c11b
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/9271c11b
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/9271c11b

Branch: refs/heads/master
Commit: 9271c11b6770573d9c8a62249363163baddbb100
Parents: 01d43f5
Author: Josef Cacek <[email protected]>
Authored: Thu Oct 8 11:19:09 2015 +0200
Committer: Ignasi Barrera <[email protected]>
Committed: Wed Oct 21 16:10:18 2015 +0200

----------------------------------------------------------------------
 apis/docker/src/test/resources/Dockerfile | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/9271c11b/apis/docker/src/test/resources/Dockerfile
----------------------------------------------------------------------
diff --git a/apis/docker/src/test/resources/Dockerfile 
b/apis/docker/src/test/resources/Dockerfile
index 3c3b30e..f375d33 100644
--- a/apis/docker/src/test/resources/Dockerfile
+++ b/apis/docker/src/test/resources/Dockerfile
@@ -14,19 +14,21 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-FROM ubuntu:14.04
-MAINTAINER Sven Dowideit <[email protected]>
 
-RUN apt-get update && apt-get install -y openssh-server
-RUN mkdir /var/run/sshd
-RUN echo 'root:screencast' | chpasswd
-RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' 
/etc/ssh/sshd_config
 
-# 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
+FROM alpine:3.2
+MAINTAINER JClouds Dev <[email protected]>
+
+ENV DROPBEAR_CONF=/etc/dropbear
 
-ENV NOTVISIBLE "in users profile"
-RUN echo "export VISIBLE=now" >> /etc/profile
+RUN apk add --update dropbear \
+    && mkdir -p ${DROPBEAR_CONF} \
+    && dropbearkey -t dss -f ${DROPBEAR_CONF}/dropbear_dss_host_key \
+    && dropbearkey -t rsa -f ${DROPBEAR_CONF}/dropbear_rsa_host_key -s 2048 \
+    && dropbearkey -t ecdsa -f ${DROPBEAR_CONF}/dropbear_ecdsa_host_key
+
+RUN echo 'root:screencast' | chpasswd
 
 EXPOSE 22
-CMD ["/usr/sbin/sshd", "-D"]
\ No newline at end of file
+
+CMD ["/usr/sbin/dropbear", "-E", "-F"]

Reply via email to