m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-19 10:23:42 -05:00

1 Commits

Author SHA1 Message Date
Sergio
ebb7c18bca fix: include OCI image manifest MIME type in Accept header when
checking for a digest update

Closes #132
2025-08-11 13:01:53 +03:00
5 changed files with 6 additions and 6 deletions

2
Cargo.lock generated
View File

@@ -376,7 +376,7 @@ dependencies = [
[[package]]
name = "cup"
version = "3.4.1"
version = "3.4.2"
dependencies = [
"bollard",
"chrono",

View File

@@ -1,6 +1,6 @@
[package]
name = "cup"
version = "3.4.1"
version = "3.4.2"
edition = "2021"
[dependencies]

View File

@@ -20,7 +20,7 @@ Sometimes, there may be a need to specify a custom docker socket. Cup provides t
For example, if using Podman, you might do
```bash
$ cup -s unix:///run/user/1000/podman/podman.sock check
$ cup -s /run/user/1000/podman/podman.sock check
```
This option is also available in the configuration file and it's best to put it there.

View File

@@ -4,7 +4,7 @@ If you need to specify a custom Docker socket (e.g. because you're using Podman)
```jsonc
{
"socket": "unix:///run/user/1000/podman/podman.sock"
"socket": "/run/user/1000/podman/podman.sock"
// Other options
}
```
@@ -16,4 +16,4 @@ You can also specify a TCP socket if you're using a remote Docker host or a [pro
"socket": "tcp://localhost:2375"
// Other options
}
```
```

View File

@@ -58,7 +58,7 @@ pub async fn get_latest_digest(
protocol, &image.parts.registry, &image.parts.repository, &image.parts.tag
);
let authorization = to_bearer_string(&token);
let headers = [("Accept", Some("application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.index.v1+json")), ("Authorization", authorization.as_deref())];
let headers = [("Accept", Some("application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.index.v1+json, application/vnd.oci.image.manifest.v1+json")), ("Authorization", authorization.as_deref())];
let response = client.head(&url, &headers).await;
let time = start.elapsed().unwrap().as_millis() as u32;