class Docr::Endpoints::Containers
  
  - Docr::Endpoints::Containers
 - Reference
 - Object
 
Overview
Class responsible for handling container operations in the Docr system.
Defined in:
docr/endpoints/containers.crConstructors
- 
        .new(client : Docr::Client)
        
          
Initializes a new Containers instance with the provided client.
 
Instance Method Summary
- 
        #attach(id : String)
        
          
Attach to a container
 - 
        #changes(id : String) : Array(Docr::Types::ContainerChangeResponseItem)
        
          
Fetches the changes made to the container.
 - #client : Docr::Client
 - 
        #create(name : String, config : Docr::Types::CreateContainerConfig) : Docr::Types::ContainerCreateResponse
        
          
Creates a new container.
 - 
        #delete(id : String, volumes = false, force = false, link = false)
        
          
Deletes a specific container.
 - 
        #inspect(id : String) : Docr::Types::ContainerInspectResponse
        
          
Inspects a specific container.
 - 
        #kill(id : String, signal = "SIGKILL")
        
          
Kills a specific container.
 - 
        #list(all : Bool = false, limit : Int32 | Nil = nil, size : Bool = false, filters = Hash(String, Array(String)).new) : Array(Docr::Types::ContainerSummary)
        
          
Fetches a list of containers.
 - 
        #logs(id : String, follow = false, stdout = false, stderr = false, since = 0, _until = 0, timestamps = false, tail = "all")
        
          
Fetches logs of a specific container.
 - 
        #pause(id : String)
        
          
Pauses a specific container.
 - 
        #restart(id : String)
        
          
Restarts a specific container.
 - 
        #start(id : String)
        
          
Starts a specific container.
 - 
        #stop(id : String)
        
          
Stops a specific container.
 - 
        #top(id : String, ps_args = "-ef") : Docr::Types::ContainerTopResponse
        
          
Fetches process details within a specific container.
 - 
        #unpause(id : String)
        
          
Unpauses a specific container.
 - 
        #wait(id : String, condition = "not-running") : Docr::Types::ContainerWaitResponse
        
          
Waits for a container to reach a specific condition.
 
Constructor Detail
Initializes a new Containers instance with the provided client.
Instance Method Detail
Fetches the changes made to the container.
- id: ID of the container.
 
Returns an array of container change items.
Creates a new container.
- name: Name of the container.
 - config: Configuration for creating the container.
 
Returns a response containing information about the created container.
Deletes a specific container.
- id: ID of the container to delete.
 - volumes: If true, remove associated volumes. Default is false.
 - force: If true, force deletion. Default is false.
 - link: If true, remove the link. Default is false.
 
Inspects a specific container.
- id: ID of the container to inspect.
 
Returns detailed information about the container.
Kills a specific container.
- id: ID of the container to kill.
 - signal: Signal to use for killing. Default is "SIGKILL".
 
Fetches a list of containers.
- all: If true, list all containers. Default is false.
 - limit: The maximum number of containers to list.
 - size: If true, fetch container sizes. Default is false.
 - filters: Container filter criteria. Default is an empty hash.
 
Returns an array of container summaries.
Fetches logs of a specific container.
- id: ID of the container.
 - follow: If true, follow logs. Default is false.
 - stdout: If true, fetch stdout logs. Default is false.
 - stderr: If true, fetch stderr logs. Default is false.
 - since: Timestamp to start showing logs. Default is 0.
 - until: Timestamp to stop showing logs. Default is 0.
 - timestamps: If true, include timestamps. Default is false.
 - tail: Number of lines to show from the end of the logs. Default is "all".
 
Returns the IO stream of the logs.
Fetches process details within a specific container.
- id: ID of the container.
 - ps_args: Arguments for the ps command. Default is "-ef".
 
Returns process details within the container.
Waits for a container to reach a specific condition.
- id: ID of the container to wait for.
 - condition: Wait condition. Default is "not-running".
 
Returns information about the waited container.