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

gcr.io/distroless/static instead of scratch #203

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

mathieu-benoit
Copy link
Contributor

@mathieu-benoit mathieu-benoit commented Nov 4, 2024

Using gcr.io/distroless/static instead of scratch because we need ca-certificates: https://github.com/GoogleContainerTools/distroless/tree/main/base.

Otherwise, getting this error:

$ docker run -v .:/score-compose -it ghcr.io/score-spec/score-compose:0.20.0 init --provisioners https://raw.githu
busercontent.com/score-spec/community-provisioners/refs/heads/main/score-compose/00-service.provisioners.yaml
Error: failed to load provisioner 1: failed to make get request: Get "https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/score-compose/00-service.provisioners.yaml": tls: failed to verify certificate: x509: certificate signed by unknown authority

Or:

$ docker run -v .:/score-compose -it ghcr.io/score-spec/score-compose:0.20.0 init --provisioners oci://ghcr.io/score-spec/score-compose-community-provisioners:v0.1.0#00-redis-dapr-state-store.provisioners.yaml
Error: failed to load provisioner 1: manifest fetch failed: Get "https://ghcr.io/v2/score-spec/score-compose-community-provisioners/manifests/v0.1.0": tls: failed to verify certificate: x509: certificate signed by unknown authority

Once approved and merged, I'll do the same for score-k8s.

@mathieu-benoit mathieu-benoit changed the title gcr.io/distroless/static instead of scratch gcr.io/distroless/static instead of scratch Nov 4, 2024
@mathieu-benoit
Copy link
Contributor Author

mathieu-benoit commented Nov 4, 2024

With this fix, I can now successfully run:

$ docker run -v .:/score-compose -it score-compose:test-with-static init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/score-compose/00-service.provisioners.yaml
INFO: Found existing state directory '.score-compose'
INFO: Found existing Score file './score.yaml'
INFO: Read 231 bytes from GET https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/score-compose/00-service.provisioners.yaml
INFO: Wrote provisioner from 'https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/score-compose/00-service.provisioners.yaml' to .score-compose/Z_sq5ZHBzew._xqoL40BT8110Qza10-JHw.provisioners.yaml
INFO: Read more about the Score specification at https://docs.score.dev/docs/

$ ls .score-compose
Z_sq5ZHBzew._xqoL40BT8110Qza10-JHw.provisioners.yaml  mounts  state.yaml  zz-default.provisioners.yaml

Copy link
Member

@astromechza astromechza left a comment

Choose a reason for hiding this comment

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

Yup, very good point. Thanks @mathieu-benoit

@mathieu-benoit mathieu-benoit merged commit 62c5aea into main Nov 6, 2024
4 checks passed
@mathieu-benoit mathieu-benoit deleted the distroless-static branch November 6, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants