-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
dockerfile: add suggestions to how to fix certain errors #2218
Conversation
@@ -243,7 +252,7 @@ func Dockerfile2LLB(ctx context.Context, dt []byte, opt ConvertOpt) (*llb.State, | |||
} | |||
d.stage.BaseName = reference.TagNameOnly(ref).String() | |||
var isScratch bool | |||
if metaResolver != nil && reachable && !d.unregistered { | |||
if metaResolver != nil && reachable { |
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.
Copy from image will now load image config here although it is not needed to get an error in the correct place. The config would have been still downloaded together with the image layers before.
@@ -23,7 +22,7 @@ func splitCommand(line string) (string, []string, string, error) { | |||
} | |||
} | |||
|
|||
return cmd, flags, strings.TrimSpace(args), nil | |||
return cmdline[0], flags, strings.TrimSpace(args), nil |
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.
Previously parser changed the casing of what the user had typed. This keeps it so that correct values can be shown on errors and should normalize to lowercase where it is actually needed.
|
||
func commonImageNames() []string { | ||
repos := []string{ | ||
"alpine", "busybox", "centos", "debian", "golang", "ubuntu", "fedora", |
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.
CentOS is about to die soon :)
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 noticed this is used only for typo-checking, so it's fine to retain centos
here)
02c1e72
to
49524c6
Compare
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
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.
Nice stuff :)
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.
nice, lgtm
The lowercasing of the command value was undone to allow to print an error message with the original casing. moby/buildkit#2218 (comment) for more context.
The lowercasing of the command value was undone to allow to print an error message with the original casing. moby/buildkit#2218 (comment) for more context.
The lowercasing of the command value was undone to allow to print an error message with the original casing. moby/buildkit#2218 (comment) for more context.
Detects mistyped: