Skip to content

commands: make build podman compatible #1207

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion commands/operator-sdk/cmd/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func buildFunc(cmd *cobra.Command, args []string) error {

log.Infof("Building Docker image %s", baseImageName)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
log.Infof("Building Docker image %s", baseImageName)
log.Infof("Building container image %s", baseImageName)

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this can be ignored after rebase: now that #1311 is merged, it's "OCI image".

There are likely other things that need to be changed now that that's merged, such as adding podman to the list of imageBuilder options


dbArgs := []string{"build", ".", "-f", "build/Dockerfile", "-t", baseImageName}
dbArgs := []string{"build", "build/", "-t", baseImageName}
Copy link
Member

Choose a reason for hiding this comment

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

I think with this change, the build command will work with both docker and podman. It seems like podman is a bit more particular about the order of the arguments.

Suggested change
dbArgs := []string{"build", "build/", "-t", baseImageName}
dbArgs := []string{"build", "-f", "build/Dockerfile", "-t", baseImageName, "."}


if dockerBuildArgs != "" {
splitArgs := strings.Fields(dockerBuildArgs)
Expand Down