Documentation
¶
Index ¶
- type ApparmorInspectOptions
- type ApparmorListOptions
- type BuilderBuildOptions
- type ContainerCommitOptions
- type ContainerExecOptions
- type ContainerInspectOptions
- type ContainerLogsOptions
- type ContainerPauseOptions
- type ContainerRemoveOptions
- type ContainerRestartOptions
- type ContainerStartOptions
- type ContainerStopOptions
- type ContainerTopOptions
- type GlobalCommandOptions
- type IPFSRegistryServeOptions
- type ImageConvertOptions
- type ImageCryptOptions
- type ImageInspectOptions
- type ImageListOptions
- type ImageLoadOptions
- type ImagePullOptions
- type ImagePushOptions
- type ImageRemoveOptions
- type ImageTagOptions
- type KillOptions
- type LoginCommandOptions
- type NamespaceCreateOptions
- type NamespaceInspectOptions
- type NamespaceRemoveOptions
- type NamespaceUpdateOptions
- type NetworkCreateOptions
- type NetworkInspectOptions
- type NetworkListOptions
- type NetworkPruneOptions
- type NetworkRemoveOptions
- type SystemEventsOptions
- type SystemInfoOptions
- type VolumeCreateOptions
- type VolumeInspectOptions
- type VolumeListOptions
- type VolumePruneOptions
- type VolumeRemoveOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApparmorInspectOptions ¶
ApparmorInspectOptions specifies options for `nerdctl apparmor inspect`
type ApparmorListOptions ¶
type ApparmorListOptions struct {
Stdout io.Writer
// Only display profile names
Quiet bool
// Format the output using the given go template
Format string
}
ApparmorListOptions specifies options for `nerdctl apparmor ls`.
type BuilderBuildOptions ¶
type BuilderBuildOptions struct {
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
// BuildKitHost is the buildkit host
BuildKitHost string
// Tag is the tag of the image
Tag []string
// File Name of the Dockerfile
File string
// Target is the target of the build
Target string
// BuildArgs is the build-time variables
BuildArgs []string
// NoCache disables cache
NoCache bool
// Output is the output destination
Output string
// Progress Set type of progress output (auto, plain, tty). Use plain to show container output
Progress string
// Secret file to expose to the build: id=mysecret,src=/local/secret
Secret []string
// SSH agent socket or keys to expose to the build (format: default|<id>[=<socket>|<key>[,<key>]])
SSH []string
// Quiet suppress the build output and print image ID on success
Quiet bool
// CacheFrom external cache sources (eg. user/app:cache, type=local,src=path/to/dir)
CacheFrom []string
// CacheTo cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir)
CacheTo []string
// Rm remove intermediate containers after a successful build
Rm bool
// Platform set target platform for build (e.g., "amd64", "arm64")
Platform []string
// IidFile write the image ID to the file
IidFile string
// Label is the metadata for an image
Label []string
// BuildContext is the build context
BuildContext string
}
BuilderBuildOptions specifies options for `nerdctl (image/builder) build`.
type ContainerCommitOptions ¶
type ContainerCommitOptions struct {
Stdout io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
// Author (e.g., "nerdctl contributor <nerdctl-dev@example.com>")
Author string
// Commit message
Message string
// Apply Dockerfile instruction to the created image (supported directives: [CMD, ENTRYPOINT])
Change []string
// Pause container during commit
Pause bool
}
ContainerCommitOptions specifies options for `nerdctl (container) commit`.
type ContainerExecOptions ¶
type ContainerExecOptions struct {
GOptions GlobalCommandOptions
// Allocate a pseudo-TTY
TTY bool
// Keep STDIN open even if not attached
Interactive bool
// Detached mode: run command in the background
Detach bool
// Working directory inside the container
Workdir string
// Set environment variables
Env []string
// Set environment variables from file
EnvFile []string
// Give extended privileges to the command
Privileged bool
// Username or UID (format: <name|uid>[:<group|gid>])
User string
}
ContainerExecOptions specifies options for `nerdctl (container) exec`
type ContainerInspectOptions ¶
type ContainerInspectOptions struct {
Stdout io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
// Format of the output
Format string
// Inspect mode, either dockercompat or native
Mode string
}
ContainerInspectOptions specifies options for `nerdctl container inspect`
type ContainerLogsOptions ¶
type ContainerLogsOptions struct {
Stdout io.Writer
Stderr io.Writer
// GOptions is the global options.
GOptions GlobalCommandOptions
// Follow specifies whether to stream the logs or just print the existing logs.
Follow bool
// Timestamps specifies whether to show the timestamps of the logs.
Timestamps bool
// Tail specifies the number of lines to show from the end of the logs.
// Specify 0 to show all logs.
Tail uint
// Show logs since timestamp (e.g., 2013-01-02T13:23:37Z) or relative (e.g., 42m for 42 minutes).
Since string
// Show logs before a timestamp (e.g., 2013-01-02T13:23:37Z) or relative (e.g., 42m for 42 minutes).
Until string
}
ContainerLogsOptions specifies options for `nerdctl (container) logs`.
type ContainerPauseOptions ¶
type ContainerPauseOptions struct {
Stdout io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
}
ContainerPauseOptions specifies options for `nerdctl (container) pause`.
type ContainerRemoveOptions ¶
type ContainerRemoveOptions struct {
Stdout io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
// Force enables to remove a running|paused|unknown container (uses SIGKILL)
Force bool
// Volumes removes anonymous volumes associated with the container
Volumes bool
}
ContainerRemoveOptions specifies options for `nerdctl (container) rm`.
type ContainerRestartOptions ¶
type ContainerRestartOptions struct {
Stdout io.Writer
GOption GlobalCommandOptions
// Time to wait after sending a SIGTERM and before sending a SIGKILL.
Timeout *time.Duration
}
ContainerRestartOptions specifies options for `nerdctl (container) restart`.
type ContainerStartOptions ¶
type ContainerStartOptions struct {
Stdout io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
// Attach specifies whether to attach to the container's stdio.
Attach bool
}
ContainerStartOptions specifies options for the `nerdctl (container) start`.
type ContainerStopOptions ¶
type ContainerStopOptions struct {
Stdout io.Writer
Stderr io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
// Timeout specifies how long to wait after sending a SIGTERM and before sending a SIGKILL.
// If it's nil, the default is 10 seconds.
Timeout *time.Duration
}
ContainerStopOptions specifies options for `nerdctl (container) stop`.
type ContainerTopOptions ¶
type ContainerTopOptions struct {
Stdout io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
}
ContainerTopOptions specifies options for `nerdctl top`.
type GlobalCommandOptions ¶
type IPFSRegistryServeOptions ¶
type IPFSRegistryServeOptions struct {
// ListenRegistry address to listen
ListenRegistry string
// IPFSAddress multiaddr of IPFS API (default is pulled from $IPFS_PATH/api file. If $IPFS_PATH env var is not present, it defaults to ~/.ipfs)
IPFSAddress string
// ReadRetryNum times to retry query on IPFS. Zero or lower means no retry.
ReadRetryNum int
// ReadTimeout timeout duration of a read request to IPFS. Zero means no timeout.
ReadTimeout time.Duration
}
IPFSRegistryServeOptions specifies options for `nerdctl ipfs registry serve`.
type ImageConvertOptions ¶
type ImageConvertOptions struct {
Stdout io.Writer
GOptions GlobalCommandOptions
// #region generic flags
// Uncompress convert tar.gz layers to uncompressed tar layers
Uncompress bool
// Oci convert Docker media types to OCI media types
Oci bool
// #region platform flags
// Platforms convert content for a specific platform
Platforms []string
// AllPlatforms convert content for all platforms
AllPlatforms bool
// Format the output using the given Go template, e.g, 'json'
Format string
// #region estargz flags
// Estargz convert legacy tar(.gz) layers to eStargz for lazy pulling. Should be used in conjunction with '--oci'
Estargz bool
// EstargzRecordIn read 'ctr-remote optimize --record-out=<FILE>' record file (EXPERIMENTAL)
EstargzRecordIn string
// EstargzCompressionLevel eStargz compression level
EstargzCompressionLevel int
// EstargzChunkSize eStargz chunk size
EstargzChunkSize int
// EstargzMinChunkSize the minimal number of bytes of data must be written in one gzip stream. (requires stargz-snapshotter >= v0.13.0)
EstargzMinChunkSize int
// EstargzExternalToc separate TOC JSON into another image (called "TOC image"). The name of TOC image is the original + "-esgztoc" suffix. Both eStargz and the TOC image should be pushed to the same registry. (requires stargz-snapshotter >= v0.13.0) (EXPERIMENTAL)
EstargzExternalToc bool
// EstargzKeepDiffID convert to esgz without changing diffID (cannot be used in conjunction with '--estargz-record-in'. must be specified with '--estargz-external-toc')
EstargzKeepDiffID bool
// #region zstd:chunked flags
// ZstdChunked convert legacy tar(.gz) layers to zstd:chunked for lazy pulling. Should be used in conjunction with '--oci'
ZstdChunked bool
// ZstdChunkedCompressionLevel zstd compression level
ZstdChunkedCompressionLevel int
// ZstdChunkedChunkSize zstd chunk size
ZstdChunkedChunkSize int
// ZstdChunkedRecordIn read 'ctr-remote optimize --record-out=<FILE>' record file (EXPERIMENTAL)
ZstdChunkedRecordIn string
// #region nydus flags
// Nydus convert legacy tar(.gz) layers to nydus for lazy pulling. Should be used in conjunction with '--oci'
Nydus bool
// NydusBuilderPath the nydus-image binary path, if unset, search in PATH environment
NydusBuilderPath string
// NydusWorkDir work directory path for image conversion, default is the nerdctl data root directory
NydusWorkDir string
// NydusPrefetchPatterns the file path pattern list want to prefetch
NydusPrefetchPatterns string
// NydusCompressor nydus blob compression algorithm, possible values: `none`, `lz4_block`, `zstd`, default is `lz4_block`
NydusCompressor string
// #region overlaybd flags
// Overlaybd convert tar.gz layers to overlaybd layers
Overlaybd bool
// OverlayFsType filesystem type for overlaybd
OverlayFsType string
// OverlaydbDBStr database config string for overlaybd
OverlaydbDBStr string
}
ImageConvertOptions specifies options for `nerdctl image convert`.
type ImageCryptOptions ¶
type ImageCryptOptions struct {
Stdout io.Writer
GOptions GlobalCommandOptions
// Platforms convert content for a specific platform
Platforms []string
// AllPlatforms convert content for all platforms
AllPlatforms bool
// GpgHomeDir the GPG homedir to use; by default gpg uses ~/.gnupg"
GpgHomeDir string
// GpgVersion the GPG version ("v1" or "v2"), default will make an educated guess
GpgVersion string
// Keys a secret key's filename and an optional password separated by colon;
Keys []string
// DecRecipients recipient of the image; used only for PKCS7 and must be an x509 certificate
DecRecipients []string
// Recipients of the image is the person who can decrypt it in the form specified above (i.e. jwe:/path/to/pubkey)
Recipients []string
}
ImageCryptOptions specifies options for `nerdctl image encrypt` and `nerdctl image decrypt`.
type ImageInspectOptions ¶
type ImageInspectOptions struct {
Stdout io.Writer
GOptions GlobalCommandOptions
// Mode Inspect mode, "dockercompat" for Docker-compatible output, "native" for containerd-native output
Mode string
// Format the output using the given Go template, e.g, 'json'
Format string
// Platform inspect content for a specific platform
Platform string
}
ImageInspectOptions specifies options for `nerdctl image inspect`.
type ImageListOptions ¶
type ImageListOptions struct {
Stdout io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
// Quiet only show numeric IDs
Quiet bool
// NoTrunc don't truncate output
NoTrunc bool
// Format the output using the given Go template, e.g, '{{json .}}', 'wide'
Format string
// Filter output based on conditions provided, for the --filter argument
Filters []string
// NameAndRefFilter filters images by name and reference
NameAndRefFilter []string
// Digests show digests (compatible with Docker, unlike ID)
Digests bool
// Names show image names
Names bool
// All (unimplemented yet, always true)
All bool
}
ImageListOptions specifies options for `nerdctl image list`.
type ImageLoadOptions ¶
type ImageLoadOptions struct {
Stdout io.Writer
Stdin io.Reader
GOptions GlobalCommandOptions
// Input read from tar archive file, instead of STDIN
Input string
// Platform import content for a specific platform
Platform []string
// AllPlatforms import content for all platforms
AllPlatforms bool
}
ImageLoadOptions specifies options for `nerdctl (image) load`.
type ImagePullOptions ¶
type ImagePullOptions struct {
Stdout io.Writer
Stderr io.Writer
GOptions GlobalCommandOptions
// Unpack the image for the current single platform (auto/true/false)
Unpack string
// Pull content for a specific platform
Platform []string
// Pull content for all platforms
AllPlatforms bool
// Verify the image (none|cosign)
Verify string
// Path to the public key file, KMS, URI or Kubernetes Secret for --verify=cosign
CosignKey string
// Suppress verbose output
Quiet bool
// multiaddr of IPFS API (default uses $IPFS_PATH env variable if defined or local directory ~/.ipfs)
IPFSAddress string
}
ImagePullOptions specifies options for `nerdctl (image) pull`.
type ImagePushOptions ¶
type ImagePushOptions struct {
Stdout io.Writer
GOptions GlobalCommandOptions
// Platforms convert content for a specific platform
Platforms []string
// AllPlatforms convert content for all platforms
AllPlatforms bool
// Estargz convert image to sStargz
Estargz bool
// IpfsEnsureImage ensure image is pushed to IPFS
IpfsEnsureImage bool
// IpfsAddress multiaddr of IPFS API (default uses $IPFS_PATH env variable if defined or local directory ~/.ipfs)
IpfsAddress string
// Sign the image (none|cosign)
Sign string
// CosignKey Path to the private key file, KMS URI or Kubernetes Secret for --sign=cosign
CosignKey string
// AllowNondistributableArtifacts allow pushing non-distributable artifacts
AllowNondistributableArtifacts bool
}
ImagePushOptions specifies options for `nerdctl (image) push`.
type ImageRemoveOptions ¶
type ImageRemoveOptions struct {
Stdout io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
// Force removal of the image
Force bool
// Asynchronous mode
Async bool
}
ImageRemoveOptions specifies options for `nerdctl rmi` and `nerdctl image rm`.
type ImageTagOptions ¶
type ImageTagOptions struct {
// GOptions is the global options
GOptions GlobalCommandOptions
// Source is the image to be referenced.
Source string
// Target is the image to be created.
Target string
}
ImageTagOptions specifies options for `nerdctl (image) tag`.
type KillOptions ¶
type KillOptions struct {
Stdout io.Writer
Stderr io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
// KillSignal is the signal to send to the container
KillSignal string
}
KillOptions specifies options for `nerdctl (container) kill`.
type LoginCommandOptions ¶
type LoginCommandOptions struct {
// GOptions is the global options.
GOptions GlobalCommandOptions
// ServerAddress is the server address to log in to.
ServerAddress string
// Username is the username to log in as.
//
// If it's empty, it will be inferred from the default auth config.
// If nothing is in the auth config, the user will be prompted to provide it.
Username string
// Password is the password of the user.
//
// If it's empty, the user will be prompted to provide it.
Password string
}
type NamespaceCreateOptions ¶
type NamespaceCreateOptions struct {
GOptions GlobalCommandOptions
// Labels are the namespace labels
Labels []string
}
NamespaceCreateOptions specifies options for `nerdctl namespace create`.
type NamespaceInspectOptions ¶
type NamespaceInspectOptions struct {
Stdout io.Writer
GOptions GlobalCommandOptions
// Format the output using the given Go template, e.g, '{{json .}}'
Format string
}
NamespaceInspectOptions specifies options for `nerdctl namespace inspect`.
type NamespaceRemoveOptions ¶
type NamespaceRemoveOptions struct {
Stdout io.Writer
GOptions GlobalCommandOptions
// CGroup delete the namespace's cgroup
CGroup bool
}
NamespaceRemoveOptions specifies options for `nerdctl namespace rm`.
type NamespaceUpdateOptions ¶
type NamespaceUpdateOptions NamespaceCreateOptions
NamespaceUpdateOptions specifies options for `nerdctl namespace update`.
type NetworkCreateOptions ¶
type NetworkCreateOptions struct {
// GOptions is the global options
GOptions GlobalCommandOptions
// CreateOptions is the option for creating network
CreateOptions netutil.CreateOptions
}
NetworkCreateOptions specifies options for `nerdctl network create`.
type NetworkInspectOptions ¶
type NetworkInspectOptions struct {
Stdout io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
// Inspect mode, "dockercompat" for Docker-compatible output, "native" for containerd-native output
Mode string
// Format the output using the given Go template, e.g, '{{json .}}'
Format string
// Networks are the networks to be inspected
Networks []string
}
NetworkInspectOptions specifies options for `nerdctl network inspect`.
type NetworkListOptions ¶
type NetworkListOptions struct {
Stdout io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
// Quiet only show numeric IDs
Quiet bool
// Format the output using the given Go template, e.g, '{{json .}}', 'wide'
Format string
}
NetworkListOptions specifies options for `nerdctl network ls`.
type NetworkPruneOptions ¶
type NetworkPruneOptions struct {
Stdout io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
// Network drivers to keep while pruning
NetworkDriversToKeep []string
}
NetworkPruneOptions specifies options for `nerdctl network prune`.
type NetworkRemoveOptions ¶
type NetworkRemoveOptions struct {
Stdout io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
// Networks are the networks to be removed
Networks []string
}
NetworkRemoveOptions specifies options for `nerdctl network rm`.
type SystemEventsOptions ¶
type SystemEventsOptions struct {
Stdout io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
// Format the output using the given Go template, e.g, '{{json .}}
Format string
}
SystemEventsOptions specifies options for `nerdctl (system) events`.
type SystemInfoOptions ¶
type SystemInfoOptions struct {
Stdout io.Writer
Stderr io.Writer
// GOptions is the global options
GOptions GlobalCommandOptions
// Information mode, "dockercompat" for Docker-compatible output, "native" for containerd-native output
Mode string
// Format the output using the given Go template, e.g, '{{json .}}
Format string
}
SystemInfoOptions specifies options for `nerdctl (system) info`.
type VolumeCreateOptions ¶
type VolumeCreateOptions struct {
Stdout io.Writer
GOptions GlobalCommandOptions
// Labels are the volume labels
Labels []string
}
VolumeCreateOptions specifies options for `nerdctl volume create`.
type VolumeInspectOptions ¶
type VolumeInspectOptions struct {
Stdout io.Writer
GOptions GlobalCommandOptions
// Format the output using the given go template
Format string
// Display the disk usage of volumes. Can be slow with volumes having loads of directories.
Size bool
}
VolumeInspectOptions specifies options for `nerdctl volume inspect`.
type VolumeListOptions ¶
type VolumeListOptions struct {
Stdout io.Writer
GOptions GlobalCommandOptions
// Only display volume names
Quiet bool
// Format the output using the given go template
Format string
// Display the disk usage of volumes. Can be slow with volumes having loads of directories.
Size bool
// Filter matches volumes based on given conditions
Filters []string
}
VolumeListOptions specifies options for `nerdctl volume ls`.
type VolumePruneOptions ¶
type VolumePruneOptions struct {
Stdout io.Writer
Stdin io.Reader
GOptions GlobalCommandOptions
// Do not prompt for confirmation
Force bool
}
VolumePruneOptions specifies options for `nerdctl volume prune`.
type VolumeRemoveOptions ¶
type VolumeRemoveOptions struct {
Stdout io.Writer
GOptions GlobalCommandOptions
// Force the removal of one or more volumes
Force bool
}
VolumeRemoveOptions specifies options for `nerdctl volume rm`.