In case the operator implementation requires changes to be made to the Dockerfile (most likely) we'd commit the changes made to Dockerfile to GitHub. Since the Dockerfile generated by the operator-sdk is placed under tmp/build developers inadvertently may commit the whole tmp/ directory which is not desirable.
Suggest moving the Dockerfile at the root of the project.
That is true. One caveat is that we would like to be able to generate it again with changes if the operator sdk is updated.
We can achieve this by having two dockerfiles. I'll propose a patch for this and we can see if it is appropriate.
thx @spahl @fanminshi let me know if you have a patch/feature branch available, happy to test it.
One option to consider is to invert the relationship between docker build and operator-sdk build. In other words, use a multi-stage Docker build that first invokes operator-sdk build and then copies the build outputs into the final image. This would provide an easy and natural way to customize the Dockerfile, and would make it possible to encapsulate the Operator SDK installation into an image.
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.
If this issue is safe to close now please do so with /close.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.
If this issue is safe to close now please do so with /close.
/lifecycle rotten
/remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.
/close
@openshift-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting
/reopen.
Mark the issue as fresh by commenting/remove-lifecycle rotten.
Exclude this issue from closing again by commenting/lifecycle frozen./close
Instructions 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.
Most helpful comment
One option to consider is to invert the relationship between
docker buildandoperator-sdk build. In other words, use a multi-stage Docker build that first invokesoperator-sdk buildand then copies the build outputs into the final image. This would provide an easy and natural way to customize theDockerfile, and would make it possible to encapsulate the Operator SDK installation into an image.