Skip to content

Commit

Permalink
👷 Cache Docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
daenney committed May 18, 2019
1 parent 1be789e commit f2c1c55
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ env:
- BIBLIOTEK_TEST_INTEGRATION=1
cache:
directories:
- $HOME/docker
- $HOME/.cache/go-build
- $GOPATH/pkg/mod
before_cache:
- >
mkdir -p $HOME/docker && docker images -a --filter='dangling=false' --format '{{.Repository}}:{{.Tag}} {{.ID}}'
| xargs -n 2 -t sh -c 'test -e $HOME/docker/$1.tar.gz || docker save $0 | gzip -2 > $HOME/docker/$1.tar.gz'
before_install:
- if [[ -d $HOME/docker ]]; then ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; fi
- docker pull eclipse-mosquitto:1.6.2
- docker run -d -p 127.0.0.1:1883:1883 eclipse-mosquitto:1.6.2
- docker ps
Expand Down

0 comments on commit f2c1c55

Please sign in to comment.