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

Ensure that ParsedDockerfile supports platform args #2780

Merged
merged 3 commits into from May 28, 2020

Conversation

rnorth
Copy link
Member

@rnorth rnorth commented May 22, 2020

Fixes #2772

Also make parsing case insensitive, for better compliance with Dockerfile spec

Fixes #2772

Also make parsing case insensitive, for better compliance with Dockerfile spec
@rnorth rnorth self-assigned this May 22, 2020
@@ -40,6 +46,12 @@ public void ignoringBuildStageNames() {
assertEquals("ignores build stage names and allows multiple images to be extracted", Sets.newHashSet("someimage", "nextimage"), parsedDockerfile.getDependencyImageNames());
}

@Test
public void ignoringPlatformArgs() {
final ParsedDockerfile parsedDockerfile = new ParsedDockerfile(asList("FROM --platform=linux/amd64 someimage", "RUN something"));
Copy link
Member

Choose a reason for hiding this comment

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

since the parsing seem to support multiple flags, perhaps we should add this (2 or more flags) case too

Copy link
Member Author

Choose a reason for hiding this comment

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

Platform seems to be the only arg that is supported by docker at present, but sure, seems like a good idea.

Copy link
Member

@bsideup bsideup left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@rnorth rnorth added this to the next milestone May 28, 2020
@rnorth rnorth merged commit 3a2462c into master May 28, 2020
@rnorth rnorth deleted the dockerfile-parse-args-2772 branch May 28, 2020 22:13
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.

ParsedDockerfile's parsing of FROM lines doesn't handle arguments
2 participants