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

crc-cloud container image with binary as entrypoint #36

Merged
merged 4 commits into from
Mar 1, 2023

Conversation

adrianriobo
Copy link
Contributor

Previously there was an entrypoint script as a helper to manage crc-cloud operations, this will require extra work to adapt to new providers, instead of using an entrypoint helper now the image will use crc-cloud binary as entrypoint.

In case of new providers or parameters there is no need to add nothing specific on the image as parameters for crc-cloud will be passed as args for the image entrypoint

This commit contains existing crc-cloud image:
quay.io/crcont/crc-cloud@sha256:bec3a9190e73c2053aaf8160f0e9059d0a510db0147cfb59a77f0d08142d4e41

And also matches with the information provided by #35

Previously there was an entrypoint script as a helper to manage crc-cloud operations, this will require extra work to adapt to new providers, instead of using an entrypoint helper now the image will use crc-cloud binary as entrypoint.

In case of new providers or parameters there is no need to add nothing specific on the image as parameters for crc-cloud will be passed as args for the image entrypoint

ENV INTERNAL_OUTPUT /tmp/crc-cloud
COPY --from=builder /workspace/out/crc-cloud /workspace/pulumi/pulumi /usr/local/bin/
Copy link

@guy9050 guy9050 Feb 8, 2023

Choose a reason for hiding this comment

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

While I understand the idea of this PR, I'm new to pulumi and I don't quite understand how/where this crc-cloud binary is built? is this happening here? because of the --from=builder?

Copy link
Contributor Author

@adrianriobo adrianriobo Feb 9, 2023

Choose a reason for hiding this comment

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

Hey @guy9050 sure this is a multistage buiild. As you can see from line 1 to line 14 there is a initial container (builder) with all the requirements to build the crc-cloud binary. And on that container is where crc-cloud binary is built

The second stage just picks assets from the builder, this allows to create a slim image without unnecessary assets for runtime (the crc-cloud image is only this second stage image)

@praveenkumar
Copy link
Member

/lgtm

@praveenkumar praveenkumar merged commit 57b9194 into crc-org:pulumi Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants