This repository was archived by the owner on Feb 8, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 11 files changed +379
-4
lines changed Expand file tree Collapse file tree 11 files changed +379
-4
lines changed Original file line number Diff line number Diff line change 1+ FROM centos:7.2.1511
2+ MAINTAINER Jimmy Xu <jimmy@hyper.sh>
3+
4+ RUN yum install -y qemu-kvm wget vim && yum clean all
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ repo=" hyperhq/test-installer-centos"
6+ tag=" 7.2.1511"
7+ image=${repo} :${tag}
8+ container=" test-installer-centos"
9+
10+ # DOCKER0=$(ifconfig | grep docker0 -A1 | grep "inet " | awk '{print $2}')
11+ # PROXY="http://${DOCKER0}:8118"
12+
13+ function build(){
14+ echo " starting build..."
15+ echo " =============================================================="
16+ CMD=" docker build --build-arg http_proxy=${PROXY} --build-arg https_proxy=${PROXY} -t ${image} ."
17+ echo " CMD: [ ${CMD} ]"
18+ eval $CMD
19+ }
20+
21+ function push(){
22+ echo -e " \nstarting push [${image} ] ..."
23+ echo " =============================================================="
24+ docker push ${image}
25+ }
26+
27+ function run() {
28+ echo -e " \ncheck old conainer from [${image} ] ..."
29+ cnt=` docker ps -a --filter=" name=${container} " | wc -l`
30+ if [ $cnt -ne 1 ]; then
31+ docker rm -fv ${container}
32+ fi
33+ echo -e " \nrun conainer from [${image} ] ..."
34+ docker run -d -t \
35+ --name ${container} \
36+ -v ` pwd` /../../../hyper-installer:/hyper-installer \
37+ $image top
38+ echo " ---------------------------------------------------"
39+ docker ps -a --filter=" name=${container} "
40+ cat << EOF
41+
42+ ---------------------------------------------------
43+ Run the following command to enter container:
44+ docker exec -it ${container} bash
45+ EOF
46+ }
47+
48+ case " $1 " in
49+ " build" )
50+ build
51+ ;;
52+ " push" )
53+ build
54+ push
55+ ;;
56+ " run" )
57+ run
58+ ;;
59+ * )
60+ cat << EOF
61+ usage:
62+ ./util.sh build # build only
63+ ./util.sh push # build and push
64+ ./util.sh run # run only
65+ EOF
66+ exit 1
67+ ;;
68+ esac
69+
70+
71+
72+ echo -e " \n=============================================================="
73+ echo " Done!"
Original file line number Diff line number Diff line change 1+ FROM debian:8.5
2+ MAINTAINER Jimmy Xu <jimmy@hyper.sh>
3+
4+ ENV DEBIAN_FRONTEND noninteractive
5+ COPY sources.list.jessie /etc/apt/sources.list
6+
7+ # qemu 2.1.2
8+ RUN apt-get update \
9+ && apt-get install -y --no-install-recommends qemu-kvm qemu libvirt0 wget vim \
10+ && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Original file line number Diff line number Diff line change 1+ deb http://mirrors.163.com/debian/ jessie main non-free contrib
2+ deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
3+ deb http://mirrors.163.com/debian/ jessie-backports main non-free contrib
4+ deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
5+ #deb-src http://mirrors.163.com/debian/ jessie main non-free contrib
6+ #deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib
7+ #deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib
8+ #deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ repo=" hyperhq/test-installer-debian"
6+ tag=" 8.5"
7+ image=${repo} :${tag}
8+ container=" test-installer-debian"
9+
10+ # DOCKER0=$(ifconfig | grep docker0 -A1 | grep "inet " | awk '{print $2}')
11+ # PROXY="http://${DOCKER0}:8118"
12+
13+ function build(){
14+ echo " starting build..."
15+ echo " =============================================================="
16+ CMD=" docker build --build-arg http_proxy=${PROXY} --build-arg https_proxy=${PROXY} -t ${image} ."
17+ echo " CMD: [ ${CMD} ]"
18+ eval $CMD
19+ }
20+
21+ function push(){
22+ echo -e " \nstarting push [${image} ] ..."
23+ echo " =============================================================="
24+ docker push ${image}
25+ }
26+
27+ function run() {
28+ echo -e " \ncheck old conainer from [${image} ] ..."
29+ cnt=` docker ps -a --filter=" name=${container} " | wc -l`
30+ if [ $cnt -ne 1 ]; then
31+ docker rm -fv ${container}
32+ fi
33+ echo -e " \nrun conainer from [${image} ] ..."
34+ docker run -d -t \
35+ --name ${container} \
36+ -v ` pwd` /../../../hyper-installer:/hyper-installer \
37+ $image top
38+ echo " ---------------------------------------------------"
39+ docker ps -a --filter=" name=${container} "
40+ cat << EOF
41+
42+ ---------------------------------------------------
43+ Run the following command to enter container:
44+ docker exec -it ${container} bash
45+ EOF
46+ }
47+
48+ case " $1 " in
49+ " build" )
50+ build
51+ ;;
52+ " push" )
53+ build
54+ push
55+ ;;
56+ " run" )
57+ run
58+ ;;
59+ * )
60+ cat << EOF
61+ usage:
62+ ./util.sh build # build only
63+ ./util.sh push # build and push
64+ ./util.sh run # run only
65+ EOF
66+ exit 1
67+ ;;
68+ esac
69+
70+
71+
72+ echo -e " \n=============================================================="
73+ echo " Done!"
Original file line number Diff line number Diff line change 1+ FROM fedora:23
2+ MAINTAINER Jimmy Xu <jimmy@hyper.sh>
3+
4+ RUN dnf -y install qemu-kvm wget vim && dnf clean all
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ repo=" hyperhq/test-installer-fedora"
6+ tag=" 23"
7+ image=${repo} :${tag}
8+ container=" test-installer-fedora"
9+
10+ # DOCKER0=$(ifconfig | grep docker0 -A1 | grep "inet " | awk '{print $2}')
11+ # PROXY="http://${DOCKER0}:8118"
12+
13+ function build(){
14+ echo " starting build..."
15+ echo " =============================================================="
16+ CMD=" docker build --build-arg http_proxy=${PROXY} --build-arg https_proxy=${PROXY} -t ${image} ."
17+ echo " CMD: [ ${CMD} ]"
18+ eval $CMD
19+ }
20+
21+ function push(){
22+ echo -e " \nstarting push [${image} ] ..."
23+ echo " =============================================================="
24+ docker push ${image}
25+ }
26+
27+ function run() {
28+ echo -e " \ncheck old conainer from [${image} ] ..."
29+ cnt=` docker ps -a --filter=" name=${container} " | wc -l`
30+ if [ $cnt -ne 1 ]; then
31+ docker rm -fv ${container}
32+ fi
33+ echo -e " \nrun conainer from [${image} ] ..."
34+ docker run -d -t \
35+ --name ${container} \
36+ -v ` pwd` /../../../hyper-installer:/hyper-installer \
37+ $image top
38+ echo " ---------------------------------------------------"
39+ docker ps -a --filter=" name=${container} "
40+ cat << EOF
41+
42+ ---------------------------------------------------
43+ Run the following command to enter container:
44+ docker exec -it ${container} bash
45+ EOF
46+ }
47+
48+ case " $1 " in
49+ " build" )
50+ build
51+ ;;
52+ " push" )
53+ build
54+ push
55+ ;;
56+ " run" )
57+ run
58+ ;;
59+ * )
60+ cat << EOF
61+ usage:
62+ ./util.sh build # build only
63+ ./util.sh push # build and push
64+ ./util.sh run # run only
65+ EOF
66+ exit 1
67+ ;;
68+ esac
69+
70+
71+
72+ echo -e " \n=============================================================="
73+ echo " Done!"
Original file line number Diff line number Diff line change 1+ FROM ubuntu:16.04
2+ MAINTAINER Jimmy Xu <jimmy@hyper.sh>
3+
4+ ENV DEBIAN_FRONTEND noninteractive
5+ COPY sources.list.xenial /etc/apt/sources.list
6+
7+ # qemu 2.5.0
8+ RUN apt-get update \
9+ && apt-get install -y --no-install-recommends qemu-kvm qemu wget vim \
10+ libavahi-client3 libavahi-common3 libnl-3-200 libxml2 libicu55 xml-core sgml-base libavahi-common-data libvirt0 \
11+ && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Original file line number Diff line number Diff line change 1+ deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
2+ deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
3+ deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
4+ deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
5+ deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
6+ #deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
7+ #deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
8+ #deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
9+ #deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
10+ #deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ repo=" hyperhq/test-installer-ubuntu"
6+ tag=" 16.04"
7+ image=${repo} :${tag}
8+ container=" test-installer-ubuntu"
9+
10+ # DOCKER0=$(ifconfig | grep docker0 -A1 | grep "inet " | awk '{print $2}')
11+ # PROXY="http://${DOCKER0}:8118"
12+
13+ function build(){
14+ echo " starting build..."
15+ echo " =============================================================="
16+ CMD=" docker build --build-arg http_proxy=${PROXY} --build-arg https_proxy=${PROXY} -t ${image} ."
17+ echo " CMD: [ ${CMD} ]"
18+ eval $CMD
19+ }
20+
21+ function push(){
22+ echo -e " \nstarting push [${image} ] ..."
23+ echo " =============================================================="
24+ docker push ${image}
25+ }
26+
27+ function run() {
28+ echo -e " \ncheck old conainer from [${image} ] ..."
29+ cnt=` docker ps -a --filter=" name=${container} " | wc -l`
30+ if [ $cnt -ne 1 ]; then
31+ docker rm -fv ${container}
32+ fi
33+ echo -e " \nrun conainer from [${image} ] ..."
34+ docker run -d -t \
35+ --name ${container} \
36+ -v ` pwd` /../../../hyper-installer:/hyper-installer \
37+ $image top
38+ echo " ---------------------------------------------------"
39+ docker ps -a --filter=" name=${container} "
40+ cat << EOF
41+
42+ ---------------------------------------------------
43+ Run the following command to enter container:
44+ docker exec -it ${container} bash
45+ EOF
46+ }
47+
48+ case " $1 " in
49+ " build" )
50+ build
51+ ;;
52+ " push" )
53+ build
54+ push
55+ ;;
56+ " run" )
57+ run
58+ ;;
59+ * )
60+ cat << EOF
61+ usage:
62+ ./util.sh build # build only
63+ ./util.sh push # build and push
64+ ./util.sh run # run only
65+ EOF
66+ exit 1
67+ ;;
68+ esac
69+
70+
71+
72+ echo -e " \n=============================================================="
73+ echo " Done!"
You can’t perform that action at this time.
0 commit comments