aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorhelenyao <yaohelan@huawei.com>2017-05-02 14:24:22 +0800
committerhelenyao <yaohelan@huawei.com>2017-05-18 15:24:07 +0800
commit0d9265dcd4ff154a500bc5a62f3f23559e3deba8 (patch)
tree0dd1fa5ffefd70a9287a5368f7706239375ed9c2 /docker
parent57da7080488785813adcaff4e2410e2338dccf2a (diff)
Add a new directory to hold pre-downloaded images
Put all images in the new direcotry. If users want to use the local image, map the local directory to the ${HOME}/functest/images Change-Id: I0d309b93f52b3da23d6130056f1a19907313ef68 Signed-off-by: helenyao <yaohelan@huawei.com>
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile5
-rw-r--r--docker/Dockerfile.aarch643
-rwxr-xr-xdocker/add_images.sh11
3 files changed, 12 insertions, 7 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 6137cc94..202eb5cb 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -25,6 +25,7 @@ ARG REPOS_DIR=/home/opnfv/repos
ARG FUNCTEST_BASE_DIR=/home/opnfv/functest
ARG FUNCTEST_CONF_DIR=${FUNCTEST_BASE_DIR}/conf
ARG FUNCTEST_DATA_DIR=${FUNCTEST_BASE_DIR}/data
+ARG FUNCTEST_IMAGES_DIR=${FUNCTEST_BASE_DIR}/images
ARG FUNCTEST_RESULTS_DIR=${FUNCTEST_BASE_DIR}/results
ARG FUNCTEST_REPO_DIR=${REPOS_DIR}/functest
ARG FUNCTEST_TEST_DIR=${FUNCTEST_REPO_DIR}/functest/opnfv_tests
@@ -71,7 +72,9 @@ RUN pip install --upgrade pip
RUN mkdir -p ${REPOS_DIR} \
&& mkdir -p ${REPOS_VNFS_DIR} \
&& mkdir -p ${FUNCTEST_BASE_DIR}/results \
- && mkdir -p ${FUNCTEST_BASE_DIR}/conf \
+ && mkdir -p ${FUNCTEST_CONF_DIR} \
+ && mkdir -p ${FUNCTEST_DATA_DIR} \
+ && mkdir -p ${FUNCTEST_IMAGES_DIR} \
&& mkdir -p /root/.ssh \
&& chmod 700 /root/.ssh
diff --git a/docker/Dockerfile.aarch64 b/docker/Dockerfile.aarch64
index 83df2d0c..b03c6d97 100644
--- a/docker/Dockerfile.aarch64
+++ b/docker/Dockerfile.aarch64
@@ -24,6 +24,7 @@ ARG REPOS_DIR=/home/opnfv/repos
ARG FUNCTEST_BASE_DIR=/home/opnfv/functest
ARG FUNCTEST_CONF_DIR=${FUNCTEST_BASE_DIR}/conf
ARG FUNCTEST_DATA_DIR=${FUNCTEST_BASE_DIR}/data
+ARG FUNCTEST_IMAGES_DIR=${FUNCTEST_BASE_DIR}/images
ARG FUNCTEST_RESULTS_DIR=${FUNCTEST_BASE_DIR}/results
ARG FUNCTEST_REPO_DIR=${REPOS_DIR}/functest
ARG FUNCTEST_TEST_DIR=${FUNCTEST_REPO_DIR}/functest/opnfv_tests
@@ -71,6 +72,8 @@ RUN mkdir -p ${REPOS_DIR} \
&& mkdir -p ${REPOS_VNFS_DIR} \
&& mkdir -p ${FUNCTEST_BASE_DIR}/results \
&& mkdir -p ${FUNCTEST_BASE_DIR}/conf \
+ && mkdir -p ${FUNCTEST_DATA_DIR} \
+ && mkdir -p ${FUNCTEST_IMAGES_DIR} \
&& mkdir -p /root/.ssh \
&& chmod 700 /root/.ssh
diff --git a/docker/add_images.sh b/docker/add_images.sh
index af2956c2..919cecd8 100755
--- a/docker/add_images.sh
+++ b/docker/add_images.sh
@@ -7,11 +7,10 @@ CIRROS_REPO_URL=http://download.cirros-cloud.net
CIRROS_AARCH64_TAG=161201
CIRROS_X86_64_TAG=0.3.5
-wget ${CIRROS_REPO_URL}/${CIRROS_X86_64_TAG}/cirros-${CIRROS_X86_64_TAG}-x86_64-disk.img -P ${FUNCTEST_BASE_DIR}/data/
-wget ${CIRROS_REPO_URL}/${CIRROS_X86_64_TAG}/cirros-${CIRROS_X86_64_TAG}-x86_64-lxc.tar.gz -P ${FUNCTEST_BASE_DIR}/data/
-wget http://205.177.226.237:9999/onosfw/firewall_block_image.img -P ${FUNCTEST_BASE_DIR}/data/
+wget ${CIRROS_REPO_URL}/${CIRROS_X86_64_TAG}/cirros-${CIRROS_X86_64_TAG}-x86_64-disk.img -P ${FUNCTEST_IMAGES_DIR}
+wget ${CIRROS_REPO_URL}/${CIRROS_X86_64_TAG}/cirros-${CIRROS_X86_64_TAG}-x86_64-lxc.tar.gz -P ${FUNCTEST_IMAGES_DIR}
# Add the 3-part image for aarch64, since functest can be run from an x86 machine to test an aarch64 POD
-wget ${CIRROS_REPO_URL}/daily/20${CIRROS_AARCH64_TAG}/cirros-d${CIRROS_AARCH64_TAG}-aarch64-disk.img -P ${FUNCTEST_BASE_DIR}/data/
-wget ${CIRROS_REPO_URL}/daily/20${CIRROS_AARCH64_TAG}/cirros-d${CIRROS_AARCH64_TAG}-aarch64-initramfs -P ${FUNCTEST_BASE_DIR}/data/
-wget ${CIRROS_REPO_URL}/daily/20${CIRROS_AARCH64_TAG}/cirros-d${CIRROS_AARCH64_TAG}-aarch64-kernel -P ${FUNCTEST_BASE_DIR}/data/
+wget ${CIRROS_REPO_URL}/daily/20${CIRROS_AARCH64_TAG}/cirros-d${CIRROS_AARCH64_TAG}-aarch64-disk.img -P ${FUNCTEST_IMAGES_DIR}
+wget ${CIRROS_REPO_URL}/daily/20${CIRROS_AARCH64_TAG}/cirros-d${CIRROS_AARCH64_TAG}-aarch64-initramfs -P ${FUNCTEST_IMAGES_DIR}
+wget ${CIRROS_REPO_URL}/daily/20${CIRROS_AARCH64_TAG}/cirros-d${CIRROS_AARCH64_TAG}-aarch64-kernel -P ${FUNCTEST_IMAGES_DIR}