Skip to content

Commit

Permalink
⚡ (test) cache the ubuntu + curl docker image to avoid re-install of …
Browse files Browse the repository at this point in the history
…curl at each run of test_first_run.sh
  • Loading branch information
davidB committed Feb 1, 2020
1 parent a65cc2d commit 6128dfa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/run_ubuntu_16.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion tests/test_first_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions tests/ubuntu_16.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM ubuntu:16.04

RUN apt-get update \
&& apt-get install -y curl \
&& rm -rf /var/lib/apt/lists/*

0 comments on commit 6128dfa

Please sign in to comment.