Skip to content
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

Fix/verify dockerfile parser #433

Merged
merged 3 commits into from
Jul 21, 2021

Conversation

Dentrax
Copy link
Member

@Dentrax Dentrax commented Jul 13, 2021

Fixes #430

Parser now replace the as keyword to AS before moving into the splitting function.

AS is the one of the special keywords that we allowed the write-in lowercase.

Dentrax and others added 2 commits July 13, 2021 23:04
Signed-off-by: Furkan <furkan.turkal@trendyol.com>
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
@cpanato cpanato added this to the v1.0.0 milestone Jul 14, 2021
line = strings.Split(line, " AS ")[0] // Remove the "AS" portion of line
line = strings.TrimPrefix(line, "FROM") // Remove "FROM" prefix
line = os.ExpandEnv(line) // Substitute templated vars
line = strings.ReplaceAll(line, "as", "AS") // replace lower "as" with "AS"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would substitute all instances of "as". I'm not sure if image names are case sensitive, but URL paths can be

@dekkagaijin
Copy link
Member

ping
I forgot that I could offer suggestions in review and pushed a commit to your branch, which broke presubmit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in verify-dockerfile
4 participants