From 6128dfacb8ba6d2debdda7e6a0196cb713e07f33 Mon Sep 17 00:00:00 2001 From: David Bernard Date: Sat, 1 Feb 2020 14:15:11 +0100 Subject: [PATCH] :zap: (test) cache the ubuntu + curl docker image to avoid re-install of curl at each run of test_first_run.sh --- tests/run_ubuntu_16.sh | 3 ++- tests/test_first_run.sh | 2 +- tests/ubuntu_16.dockerfile | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 tests/ubuntu_16.dockerfile diff --git a/tests/run_ubuntu_16.sh b/tests/run_ubuntu_16.sh index d6534af..812668e 100755 --- a/tests/run_ubuntu_16.sh +++ b/tests/run_ubuntu_16.sh @@ -2,11 +2,12 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +docker build -t ubuntu_curl:16.04 -f "${DIR}/ubuntu_16.dockerfile" "${DIR}" docker run --rm \ -v ${DIR}/..:/prj \ -v $HOME/.kube:/root/.kube \ -w /tmp \ - ubuntu:16.04 \ + ubuntu_curl:16.04 \ /prj/tests/test_first_run.sh # docker run --rm -it \ diff --git a/tests/test_first_run.sh b/tests/test_first_run.sh index 530d34b..d0bcd60 100755 --- a/tests/test_first_run.sh +++ b/tests/test_first_run.sh @@ -2,7 +2,7 @@ #set -ex -apt-get update && apt-get install -y curl +# apt-get update && apt-get install -y curl #curl https://raw.githubusercontent.com/davidB/kubectl-view-allocations/master/scripts/getLatest.sh | sh #sh /prj/scripts/getLatest.sh bash /prj/scripts/getLatest.sh diff --git a/tests/ubuntu_16.dockerfile b/tests/ubuntu_16.dockerfile new file mode 100644 index 0000000..ed641e9 --- /dev/null +++ b/tests/ubuntu_16.dockerfile @@ -0,0 +1,5 @@ +FROM ubuntu:16.04 + +RUN apt-get update \ + && apt-get install -y curl \ + && rm -rf /var/lib/apt/lists/*