From 00760a7925439aa13216c9392a8cd73e350d7a90 Mon Sep 17 00:00:00 2001 From: Athmane Madjoudj Date: Apr 08 2014 16:35:04 +0000 Subject: Initial import --- diff --git a/docker-run_tests.sh b/docker-run_tests.sh new file mode 100644 index 0000000..d87b049 --- /dev/null +++ b/docker-run_tests.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# A script to test the official CentOS docker-images. +# Author: Athmane Madjoudj + +EPEL6_RELEASE_URL = "http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm" +EPEL6_GPGKEY_URL = "https://fedoraproject.org/static/0608B895.txt" + +enable_epel() { + yum -y install wget openssh-clients + cd /root + wget "$EPEL6_RELEASE_URL" + rpm --import "$EPEL6_GPGKEY_URL" + yum -y localinstall /root/epel-release*.rpm +} + +setup_docker() { + yum -y install docker-io + service docker start + chkconfig docker on +} + +test_get_centos_img() { + docker pull centos +} + +test_centos_img_runcmd() { + docker run centos cat /etc/centos-release | grep 'CentOS' +} + +run_tests() { + test_get_centos_img + test_centos_img_runcmd +} + +# Main + +enable_epel +setup_docker +run_tests +