canonical / kratos-rock

OCI image for Ory Kratos based on Ubuntu built using rockcraft.
https://github.com/canonical/kratos-rock/pkgs/container/kratos
Apache License 2.0
0 stars 1 forks source link

Cannot run update-ca-certificates #26

Open nsklikas opened 1 year ago

nsklikas commented 1 year ago

Even though we add the ca-certificates package, we can't run the update-ca-certificates script. Currently it fails because rm and mktemp are not present in the bare image.

$ docker run ghcr.io/canonical/kratos:1.0.0 exec update-ca-certificates
2023-09-11T14:09:32.773Z [pebble] Started daemon.
2023-09-11T14:09:32.781Z [pebble] POST /v1/exec 7.802789ms 202
2023-09-11T14:09:32.787Z [pebble] GET /v1/tasks/1/websocket/control 5.682901ms 200
2023-09-11T14:09:32.787Z [pebble] GET /v1/tasks/1/websocket/stdio 38.334µs 200
2023-09-11T14:09:32.788Z [pebble] GET /v1/tasks/1/websocket/stderr 27.827µs 200
/usr/sbin/update-ca-certificates: 84: mktemp: not found
/usr/sbin/update-ca-certificates: 75: rm: not found
2023-09-11T14:09:32.806Z [pebble] GET /v1/changes/1/wait 18.323217ms 200
syncronize-issues-to-jira[bot] commented 1 year ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/IAM-483.

This message was autogenerated

bencekov commented 1 year ago

I added all the packages to run update-ca-certificates, on this branch: https://github.com/canonical/kratos-rock/blob/IAM-483-Enable-certificates-update/rockcraft.yaml

I got this error message: sed: can't read /etc/ca-certificates.conf: No such file or directory

I verified that the file isn't there. I guess this file gets created when a package manager triggers a script.

I'm not sure what's the best way to proceed. Seems like other charms that use ca-certificates don't use the bare build for ubuntu.

nsklikas commented 1 year ago

I tried it out a little and I have a couple of comments:

It is not clear how to move forward:

javierdelapuente commented 7 months ago

You can try to install the ca-certificates in the overlay-packages (@amandahla suggested me that approach and it worked for me).