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

dev variants for base images #187

Closed
dlorenc opened this issue Jan 4, 2023 · 23 comments
Closed

dev variants for base images #187

dlorenc opened this issue Jan 4, 2023 · 23 comments
Assignees
Labels
image-request tag for new chainguard image requests images q123

Comments

@dlorenc
Copy link
Contributor

dlorenc commented Jan 4, 2023

We should include -debug variants for our base images (static, cc, glibc-dynamic) etc. These would be the same as normal but then have a shell!

@amouat
Copy link
Contributor

amouat commented Jan 4, 2023

The PHP image has latest-dev, which is pretty much the same thing. We could also add something similar to the Python, Ruby and JRE images. See https://github.com/chainguard-images/images/tree/main/images/php

We should agree on debug vs dev wording. I'd currently lean towards dev I think.

@charlieegan3
Copy link
Contributor

Hi, just a drive by comment to mention that the OPA project would like to make use of this for the cgr.dev/chainguard/cc-dynamic image. We've updated our other images to use this as the base (open-policy-agent/opa#5540) however we still have a -debug image with a shell (currently based on gcr.io/distroless/cc-debian11:debug).

We'd like to move to a debug image which doesn't contain OpenSSL.

@patflynn
Copy link
Contributor

any objections to using 'dev' since we've already started down that road?

@charlieegan3
Copy link
Contributor

(Not from us!)

@charlieegan3
Copy link
Contributor

Hi all, any update on this one?

@amouat
Copy link
Contributor

amouat commented Jan 30, 2023

Working on it as we speak, don't have a timeline yet. I want to standardise all tags at the same time.

@charlieegan3
Copy link
Contributor

Thanks for the update @amouat and for your work on this, keep us posted!

@amouat
Copy link
Contributor

amouat commented Feb 21, 2023

We've now published a best practice guide, which includes creating "dev" variants. The next step is to apply the practices to all of our images. https://github.com/chainguard-images/images/blob/main/BEST_PRACTICES.md

@charlieegan3
Copy link
Contributor

That sounds ideal 👍 thanks for sharing!

@patflynn
Copy link
Contributor

We're going to try and auto-generate debug variants once the apko versions of 'build options' is available. chainguard-dev/melange#297

@patflynn patflynn changed the title debug variants for base images dev variants for base images Feb 23, 2023
@patflynn
Copy link
Contributor

couple of notes about what the overrides should be:

add deps:

  • wolfi-base (busybox, apktools)

set user: root (this is probably worth discussing)

@patflynn
Copy link
Contributor

This PR , should enable us to generate dev variants for our images.

@charlieegan3
Copy link
Contributor

Thanks for the updates Patrick! This is looking great so far 🙂

@jdolitsky
Copy link
Contributor

So we now have this file which defines a dev variant to apply wherever we want to: https://github.com/chainguard-images/images/blob/main/globals.yaml

My remaining questions are:

  • What are the correct packages to be brought in for dev variants? Currently its apk-tools+bash+busybox, but should it be just wolfi-base?
  • Do we still want to set user to root?
  • Which images should have a dev variant? All of them?

@patflynn

@patflynn
Copy link
Contributor

@amouat @kaniini FYI

I believe that yes it should just be wolfi-base and then a mechanism for customization for specific images (like python-dev including pip)

@patflynn
Copy link
Contributor

I'm not sure about including a dev for all images but maybe yes? @amouat thoughts?

@patflynn
Copy link
Contributor

and yes to user root for dev variants. @amouat again to confirm.

@jdolitsky
Copy link
Contributor

marking as done for now.

if we need to modify the global dev options (root user, etc.) its a simple change. or if we need to add a dev variant to another image, simple change

@charlieegan3
Copy link
Contributor

Hey, would it be better to open another issue for the adding of a dev variant for the cgr.dev/chainguard/cc-dynamic image?

@jdolitsky
Copy link
Contributor

@charlieegan3 - sorry we didnt get that one before. Patrick just added it in #367. Try this image:

cgr.dev/chainguard/cc-dynamic:latest-dev

If there are any issues with using it, or require another dev variant, please open another issue. Thank you!

@charlieegan3
Copy link
Contributor

Amazing, thanks! 😊

@charlieegan3
Copy link
Contributor

Just realised that we also need a -dev variant for static but I can open a PR for that 😊

@charlieegan3
Copy link
Contributor

#368

charlieegan3 added a commit to open-policy-agent/opa that referenced this issue Mar 23, 2023
This completes the work started in #5540

Fixes #5544

We can't use distroless since they don't have a nossl cc image: GoogleContainerTools/distroless#1210

Chainguard have added this (-dev rather than :debug) to their image collection: chainguard-images/images#187

Following advice here, using their busybox is the best replacement for `gcr.io/distroless/static:debug` chainguard-images/images#368 (comment)

Signed-off-by: Charlie Egan <charlie@styra.com>
developer-guy pushed a commit to Dentrax/images that referenced this issue Feb 12, 2024
switch enterprise secdeb feed to combine OSS advisories from new repo…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
image-request tag for new chainguard image requests images q123
Projects
None yet
Development

No branches or pull requests

5 participants