-
Notifications
You must be signed in to change notification settings - Fork 513
[container-build]: Support inline Dockerfile from stdin #827
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
base: main
Are you sure you want to change the base?
[container-build]: Support inline Dockerfile from stdin #827
Conversation
96aad2b to
9a0d411
Compare
| } | ||
|
|
||
| let buildFileData = try Data(contentsOf: URL(filePath: buildFilePath)) | ||
| let buildFileData: Data |
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.
Looks good to me.
Could you add a test for this? Just copy one of the simple tests in CLIBuilderTest and supply the Dockerfile via stdin instead of a file.
I think this will require creating a separate helper function to https://github.com/apple/container/blob/main/Tests/CLITests/Subcommands/Build/CLIBuildBase.swift#L112, since there's nothing in that test support stuff that knows how to pipe stdin into container build.
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.
We need to make changes in the run function of the CLITest file as well. There needs to be a way to add the data to the stdin pipe.
71ea529 to
7b1c1fb
Compare
Type of Change
Motivation and Context
Closes #727
Tested variations of commands with
stdinbelowTesting