mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
fix: initialize images before netdummy (#2418)
This commit is contained in:
@@ -320,20 +320,6 @@ pub async fn init(cfg: &RpcContextConfig) -> Result<InitResult, Error> {
|
|||||||
}
|
}
|
||||||
tracing::info!("Mounted Docker Data");
|
tracing::info!("Mounted Docker Data");
|
||||||
|
|
||||||
if CONTAINER_TOOL == "podman" {
|
|
||||||
Command::new("podman")
|
|
||||||
.arg("run")
|
|
||||||
.arg("-d")
|
|
||||||
.arg("--rm")
|
|
||||||
.arg("--network=start9")
|
|
||||||
.arg("--name=netdummy")
|
|
||||||
.arg("start9/x_system/utils:latest")
|
|
||||||
.arg("sleep")
|
|
||||||
.arg("infinity")
|
|
||||||
.invoke(crate::ErrorKind::Docker)
|
|
||||||
.await?;
|
|
||||||
}
|
|
||||||
|
|
||||||
if should_rebuild || !tmp_docker_exists {
|
if should_rebuild || !tmp_docker_exists {
|
||||||
if CONTAINER_TOOL == "docker" {
|
if CONTAINER_TOOL == "docker" {
|
||||||
tracing::info!("Creating Docker Network");
|
tracing::info!("Creating Docker Network");
|
||||||
@@ -350,6 +336,20 @@ pub async fn init(cfg: &RpcContextConfig) -> Result<InitResult, Error> {
|
|||||||
tracing::info!("Loaded Package Docker Images");
|
tracing::info!("Loaded Package Docker Images");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if CONTAINER_TOOL == "podman" {
|
||||||
|
Command::new("podman")
|
||||||
|
.arg("run")
|
||||||
|
.arg("-d")
|
||||||
|
.arg("--rm")
|
||||||
|
.arg("--network=start9")
|
||||||
|
.arg("--name=netdummy")
|
||||||
|
.arg("start9/x_system/utils:latest")
|
||||||
|
.arg("sleep")
|
||||||
|
.arg("infinity")
|
||||||
|
.invoke(crate::ErrorKind::Docker)
|
||||||
|
.await?;
|
||||||
|
}
|
||||||
|
|
||||||
tracing::info!("Enabling Docker QEMU Emulation");
|
tracing::info!("Enabling Docker QEMU Emulation");
|
||||||
Command::new(CONTAINER_TOOL)
|
Command::new(CONTAINER_TOOL)
|
||||||
.arg("run")
|
.arg("run")
|
||||||
|
|||||||
Reference in New Issue
Block a user