Skip to content

artemkoru/multistage-build-and-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Multistage Docker Build Cache using skaffold (alternative solution)

This repo demonstates how skaffold works with environment variables in the configuration parameter build.artifacts[*].docker.cacheFrom.

Issue: GoogleContainerTools/skaffold#6809 Skaffold version: v1.34.0 OS: MacOS

Docker cacheFrom using static docker images

To check this run commands bellow (it works as expected):

export SKAFFOLD_DEFAULT_REPO=<your docker repo> 
source .envrc
skaffold build -p dev --cache-artifacts=false

You need to change the <your docker repo> to the appropriate repository.

Docker cacheFrom using environment variables

To check this run commands bellow (it fails):

export SKAFFOLD_DEFAULT_REPO=<your docker repo>  
source .envrc
skaffold build -p branch --cache-artifacts=false

You need to change the <your docker repo> to the appropriate repository.

The error:

getting imageID for "{{.SKAFFOLD_DEFAULT_REPO}}/multistage-build-and-cache:{{.GIT_BRANCH_DASH}}-builder-cache": getting imageID for {{.SKAFFOLD_DEFAULT_REPO}}/multistage-build-and-cache:{{.GIT_BRANCH_DASH}}-builder-cache: Error response from daemon: no such image: {{.SKAFFOLD_DEFAULT_REPO}}/multistage-build-and-cache:{{.GIT_BRANCH_DASH}}-builder-cache: invalid reference format

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published