1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 09:04:12 +02:00

image pull fixes

This commit is contained in:
Robin Appelman 2022-01-24 17:31:48 +01:00
commit 18fbc152ab
2 changed files with 6 additions and 2 deletions

View file

@ -176,7 +176,7 @@ impl Database {
if matches!(self, Database::Sqlite) {
return Ok(None);
}
pull_image(docker, self.image())
pull_image(docker, &format!("library/{}", self.image()))
.await
.wrap_err("Failed to pull database image")?;
let options = Some(CreateContainerOptions {

View file

@ -18,7 +18,11 @@ pub async fn pull_image(docker: &Docker, image: &str) -> Result<()> {
let mut info_stream = docker.create_image(
Some(CreateImageOptions {
from_image: format!("{}:latest", image),
from_image: if image.contains(":") {
image.to_string()
} else {
format!("{}:latest", image)
},
..Default::default()
}),
None,