Skip to content

Commit 4a7835d

Browse files
committed
hardcode image build pull credentials
Signed-off-by: Robert Detjens <[email protected]>
1 parent d91818f commit 4a7835d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/builder/docker.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,17 @@ pub async fn build_image(
5555
.with_context(|| "could not create image context tarball")?;
5656
let tarball = tar.into_inner()?;
5757

58+
let credentials = bollard::auth::DockerCredentials {
59+
username: Some("detjensrobert".to_string()),
60+
password: Some("60989d59-d225-4b83-852a-9896099cb300".to_string()),
61+
..Default::default()
62+
};
63+
64+
let mut creds_hsh = std::collections::HashMap::new();
65+
creds_hsh.insert("docker.io".to_string(), credentials);
66+
5867
// send to docker daemon
59-
let mut build_stream = client.build_image(build_opts, None, Some(tarball.into()));
68+
let mut build_stream = client.build_image(build_opts, Some(creds_hsh), Some(tarball.into()));
6069

6170
// stream output to stdout
6271
while let Some(item) = build_stream.next().await {

0 commit comments

Comments
 (0)