feat(docker): using cache-from can speed up your Docker builds

This commit is contained in:
Bo-Yi Wu
2019-02-22 00:56:48 +08:00
parent 2aee0589c9
commit 6b07a8b27d
2 changed files with 8 additions and 0 deletions

View File

@ -154,6 +154,7 @@ local PipelineBuild(name, os='linux', arch='amd64') = {
tags: os + '-' + arch,
dockerfile: 'docker/Dockerfile.' + os + '.' + arch,
repo: 'appleboy/' + name,
cache_from: 'appleboy/' + name,
username: { 'from_secret': 'docker_username' },
password: { 'from_secret': 'docker_password' },
},
@ -171,6 +172,7 @@ local PipelineBuild(name, os='linux', arch='amd64') = {
auto_tag_suffix: os + '-' + arch,
dockerfile: 'docker/Dockerfile.' + os + '.' + arch,
repo: 'appleboy/' + name,
cache_from: 'appleboy/' + name,
username: { 'from_secret': 'docker_username' },
password: { 'from_secret': 'docker_password' },
},