1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00

update bollard

This commit is contained in:
Robin Appelman 2026-02-27 22:52:40 +01:00
commit df38f16f10
23 changed files with 410 additions and 502 deletions

View file

@ -6,9 +6,9 @@ use crate::php::{PhpVersion, PHP_MEMORY_LIMIT};
use crate::service::Service;
use crate::service::ServiceTrait;
use crate::sources::download_nc;
use bollard::container::{ListContainersOptions, RemoveContainerOptions, UpdateContainerOptions};
use bollard::models::ContainerState;
use bollard::network::CreateNetworkOptions;
use bollard::config::NetworkCreateRequest;
use bollard::models::{ContainerState, ContainerUpdateBody};
use bollard::query_parameters::{ListContainersOptions, RemoveContainerOptions};
use bollard::Docker;
use camino::{Utf8Path, Utf8PathBuf};
use flate2::read::GzDecoder;
@ -301,8 +301,8 @@ impl Cloud {
}
let network = docker
.create_network(CreateNetworkOptions {
name: id.as_str(),
.create_network(NetworkCreateRequest {
name: id.clone(),
..Default::default()
})
.await
@ -310,7 +310,7 @@ impl Cloud {
.id;
let network_info = docker
.inspect_network::<String>(&network, None)
.inspect_network(&network, None)
.await
.into_diagnostic()?;
let gateway = network_info
@ -598,7 +598,7 @@ impl Cloud {
config: &HazeConfig,
) -> Result<Vec<Cloud>> {
let containers = docker
.list_containers::<String>(Some(ListContainersOptions {
.list_containers(Some(ListContainersOptions {
all: true,
..Default::default()
}))
@ -752,9 +752,9 @@ impl Cloud {
docker
.update_container(
&self.id,
UpdateContainerOptions::<String> {
ContainerUpdateBody {
memory: Some(PHP_MEMORY_LIMIT + 1),
..UpdateContainerOptions::default()
..ContainerUpdateBody::default()
},
)
.await
@ -766,9 +766,9 @@ impl Cloud {
docker
.update_container(
&self.id,
UpdateContainerOptions::<String> {
ContainerUpdateBody {
memory: Some(PHP_MEMORY_LIMIT),
..UpdateContainerOptions::default()
..ContainerUpdateBody::default()
},
)
.await