-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shell out docker build #840
Shell out docker build #840
Conversation
4f92d9c
to
b1ae16a
Compare
examples/annotated-skaffold.yaml
Outdated
# Pushing the images can be skipped. If no value is specified, it'll default to | ||
# `true` on minikube or Docker for Desktop, for even faster build and deploy cycles. | ||
# `false` on other types of kubernetes clusters that require pushing the images. | ||
# kaffold defers to your ~/.docker/config for authentication information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kaffold -> skaffold
pkg/skaffold/build/docker.go
Outdated
if l.cfg.UseDockerCLI || l.cfg.UseBuildkit { | ||
absDockerfilePath := a.DockerfilePath | ||
if !filepath.IsAbs(a.DockerfilePath) { | ||
absDockerfilePath = filepath.Join(workspace, a.DockerfilePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you also need to be sure you don't append the workspace twice, since the workspace itself can also be a relative path. I did this here, you could pull this out into a util package and reuse it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I'll do that
b1ae16a
to
d36ed59
Compare
Fix the case where a build arg has no value. Signed-off-by: David Gageot <[email protected]>
Signed-off-by: David Gageot <[email protected]>
d36ed59
to
d83d107
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one small nit but otherwise LGTM
pkg/skaffold/docker/context.go
Outdated
|
||
cstorage "cloud.google.com/go/storage" | ||
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" | ||
"github.com/pkg/errors" | ||
) | ||
|
||
// NormalizeDockerfilePath returns the abolute path to the dockerfile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
abolute -> absolute :)
Signed-off-by: David Gageot <[email protected]>
d83d107
to
d1fba60
Compare
Support an alternative way of building locally by running
docker build
directly. This is also a good opportunity to let the user enable experimental buildkit.