fussybeaver / bollard

Docker daemon API in Rust
Apache License 2.0
912 stars 134 forks source link

how to use github registry? #358

Open louis030195 opened 11 months ago

louis030195 commented 11 months ago

how do you use non docker hub registry? Getting 404:

let config = Config {
    image: Some("ghcr.io/stellar-amenities/assistants/assistants-code-interpreter:latest"),
    host_config: Some(HostConfig {
        auto_remove: Some(true),
        ..Default::default()
    }),
    attach_stdin: Some(true),
    attach_stdout: Some(true),
    attach_stderr: Some(true),
    open_stdin: Some(true),
    tty: Some(true),
    ..Default::default()
};
fussybeaver commented 11 months ago

The unix tests mostly use a private registry, so the image_push_test shows without too much indirection how to pull and authenticate a pull from a non-docker hub registry https://github.com/fussybeaver/bollard/blob/master/tests/container_test.rs#L55-L119