commands: make build podman compatible#1207
commands: make build podman compatible#1207delvin1933 wants to merge 1 commit intooperator-framework:masterfrom
Conversation
When running 'operator-sdk' build with podman-docker the build fails with a path error. Removing -f and setting the PATH argument to ./build allows podman to build the container.
|
Hi @christophefarges. Thanks for your PR. I'm waiting for a operator-framework or openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@christophefarges I don't think this change will work because the Dockerfile expects the working directory to be I tested your PR with docker-ce 18.06.1, and got the following error: |
| log.Infof("Building Docker image %s", baseImageName) | ||
|
|
||
| dbArgs := []string{"build", ".", "-f", "build/Dockerfile", "-t", baseImageName} | ||
| dbArgs := []string{"build", "build/", "-t", baseImageName} |
There was a problem hiding this comment.
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.
| dbArgs := []string{"build", "build/", "-t", baseImageName} | |
| dbArgs := []string{"build", "-f", "build/Dockerfile", "-t", baseImageName, "."} |
|
@christophefarges any traction on those changes? I'd very much like |
|
@christophefarges: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@christophefarges Pinging again, if you are too busy one of us can also take over this PR. :) |
| @@ -172,7 +172,7 @@ func buildFunc(cmd *cobra.Command, args []string) error { | |||
|
|
|||
| log.Infof("Building Docker image %s", baseImageName) | |||
There was a problem hiding this comment.
| log.Infof("Building Docker image %s", baseImageName) | |
| log.Infof("Building container image %s", baseImageName) |
There was a problem hiding this comment.
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
|
Sorry for the enduser ping. I also do not use Docker and I would love to see better support for podman. |
|
I don't have an issue using |
|
Since the original intent of this PR seems to be resolved, I'll close this. I've also submitted #1488 to add a |
Description of the change:
When running 'operator-sdk' build with podman-docker the build fails
with a path error. Removing -f and setting the PATH argument to ./build
allows podman to build the container.
Has been tested against podman 1.12 on fedora 29 and docker-ce 5:18.09.3
3-0debian-stretch on debian stretchMotivation for the change:
I want to be able to build the operator container with podman as I don't use docker