Skip to content

Image Operation Related Models

class DockerConfig(BaseModel)

Docker container configuration

FieldTypeDescription
containerNamestrContainer name
imagestrImage name
portslist[str]Container port mappings, eg: ["25565:25565/tcp"]
extraVolumeslist[str]Extra mounted volume paths
memoryintMemory allocated to container (unit: MB)
memorySwapintSwap memory allocated to container (unit: MB)
memorySwappinessintVirtual memory usage tendency (0-100)
networkModestrNetwork mode (e.g., bridge, host)
networkAliaseslist[str]List of network aliases
maxSpaceintMaximum disk space container can use (unit: MB)
networkintContainer network configuration (deprecated)
iointContainer I/O limit (unit: MB)
cpusetCpusstrBound CPU cores, eg: 0,1
cpuUsageintCPU usage limit (unit: %)
workingDirstrContainer working directory
envlist[str]Environment variables
changeWorkdirboolWhether to change the default working directory

class DockerImageItem(BaseModel)

Docker image information

FieldTypeDescription
IdstrUnique image ID
ParentIdstrParent image ID
RepoTagslist[str]Image repository tags, eg: ["ubuntu:latest"]
RepoDigestslist[str]Image digests
CreatedintImage creation time (Unix timestamp)
SizeintImage size (unit: bytes)
VirtualSizeintVirtual size of the image
SharedSizeintShared storage space size
Labelsdict[str, str]Image labels
ContainersintNumber of containers running using this image

class DockerContainerItemPort(BaseModel)

Docker container port mapping

FieldTypeDescription
PrivatePortintInternal container port
PublicPortint | NonePort mapped to the host
TypeLiteral["tcp", "udp"]Port type

class DockerContainerItemNetworkSettingsNetwork(BaseModel)

Docker container network settings information

FieldTypeDescription
NetworkIDstrNetwork ID
EndpointIDstrNetwork endpoint ID
GatewaystrGateway address
IPAddressstrAssigned IP address
IPPrefixLenintIP address prefix length
IPv6GatewaystrIPv6 gateway address
GlobalIPv6AddressstrIPv6 address
GlobalIPv6PrefixLenintIPv6 address prefix length
MacAddressstrMAC address

class DockerContainerItemNetworkSettings(BaseModel)

Docker container network settings information

FieldTypeDescription
Networksdict[str, DockerContainerItemNetworkSettingsNetwork]All networks the container is connected to

class DockerContainerItemMount(BaseModel)

Container mount point information

FieldTypeDescription
NamestrMount name
SourcestrSource path
DestinationstrDestination path
DriverstrDriver type
ModestrMount mode
RWboolWhether read-write is allowed
PropagationstrPropagation mode

class DockerContainerItemHostConfig(BaseModel)

Docker host configuration

FieldTypeDescription
NetworkModestrNetwork mode

class DockerContainerItem(BaseModel)

Docker container detailed information

FieldTypeDescription
IdstrContainer ID
Nameslist[str]List of container names
ImagestrName of the running image
ImageIDstrImage ID
CommandstrContainer startup command
CreatedintContainer creation time (Unix timestamp)
StatestrContainer state
StatusstrContainer running status description
Portslist[DockerContainerItemPort]Port mapping information
Labelsdict[str, str]Container label information
SizeRwintRead-write layer size (unit: bytes)
SizeRootFsintRoot filesystem size (unit: bytes)
HostConfigDockerContainerItemHostConfigHost configuration
NetworkSettingsDockerContainerItemNetworkSettingsContainer network configuration
Mountslist[DockerContainerItemMount]Container mount information

class DockerNetworkItemIPAMConfig(BaseModel)

Docker network IPAM configuration information

FieldTypeDescription
SubnetstrSubnet address

class DockerNetworkItemIPAM(BaseModel)

Docker network IP address management

FieldTypeDescription
DriverstrDriver type
Configlist[DockerNetworkItemIPAMConfig]IPAM configuration

class DockerNetworkItem(BaseModel)

Docker network detailed information

FieldTypeDescription
NamestrNetwork name
IdstrNetwork ID
CreatedstrNetwork creation time
ScopestrScope (local/global)
DriverstrNetwork driver type
EnableIPv6boolWhether IPv6 is enabled
InternalboolWhether it is an internal network
AttachableboolWhether it is attachable
IngressboolWhether it is an ingress network
IPAMDockerNetworkItemIPAMIPAM configuration information
Optionsdict[str, str]Network options
Containersdict[str, dict]Information of containers connected to this network

Released under the MIT License.