Documentation ¶
Overview ¶
Package client provides a command-line interface for Docker.
Run "docker help SUBCOMMAND" or "docker SUBCOMMAND --help" to see more information on any Docker subcommand, including the full list of options supported for the subcommand. See https://docs.docker.com/installation/ for instructions on installing Docker.
Index ¶
- Constants
- func ParseExec(cmd *flag.FlagSet, args []string) (*types.ExecConfig, error)
- type DockerCli
- func (cli *DockerCli) Build(args ...string) error
- func (cli *DockerCli) CheckTtyInput(attachStdin, ttyMode bool) error
- func (cli *DockerCli) CmdAttach(args ...string) error
- func (cli *DockerCli) CmdCommit(args ...string) error
- func (cli *DockerCli) CmdCompose(args ...string) error
- func (cli *DockerCli) CmdComposeCreate(args ...string) error
- func (cli *DockerCli) CmdComposeDown(args ...string) error
- func (cli *DockerCli) CmdComposeKill(args ...string) error
- func (cli *DockerCli) CmdComposePs(args ...string) error
- func (cli *DockerCli) CmdComposePull(args ...string) error
- func (cli *DockerCli) CmdComposeRm(args ...string) error
- func (cli *DockerCli) CmdComposeRun(args ...string) error
- func (cli *DockerCli) CmdComposeScale(args ...string) error
- func (cli *DockerCli) CmdComposeStart(args ...string) error
- func (cli *DockerCli) CmdComposeStop(args ...string) error
- func (cli *DockerCli) CmdComposeUp(args ...string) error
- func (cli *DockerCli) CmdConfig(args ...string) error
- func (cli *DockerCli) CmdCreate(args ...string) error
- func (cli *DockerCli) CmdCron(args ...string) error
- func (cli *DockerCli) CmdCronCreate(args ...string) error
- func (cli *DockerCli) CmdCronHistory(args ...string) error
- func (cli *DockerCli) CmdCronInspect(args ...string) error
- func (cli *DockerCli) CmdCronLs(args ...string) error
- func (cli *DockerCli) CmdCronRm(args ...string) error
- func (cli *DockerCli) CmdExec(args ...string) error
- func (cli *DockerCli) CmdFip(args ...string) error
- func (cli *DockerCli) CmdFipAllocate(args ...string) error
- func (cli *DockerCli) CmdFipAttach(args ...string) error
- func (cli *DockerCli) CmdFipDetach(args ...string) error
- func (cli *DockerCli) CmdFipLs(args ...string) error
- func (cli *DockerCli) CmdFipName(args ...string) error
- func (cli *DockerCli) CmdFipRelease(args ...string) error
- func (cli *DockerCli) CmdFunc(args ...string) error
- func (cli *DockerCli) CmdFuncCall(args ...string) error
- func (cli *DockerCli) CmdFuncCreate(args ...string) error
- func (cli *DockerCli) CmdFuncGet(args ...string) error
- func (cli *DockerCli) CmdFuncInspect(args ...string) error
- func (cli *DockerCli) CmdFuncLogs(args ...string) error
- func (cli *DockerCli) CmdFuncLs(args ...string) error
- func (cli *DockerCli) CmdFuncRm(args ...string) error
- func (cli *DockerCli) CmdFuncStatus(args ...string) error
- func (cli *DockerCli) CmdFuncUpdate(args ...string) error
- func (cli *DockerCli) CmdHistory(args ...string) error
- func (cli *DockerCli) CmdImages(args ...string) error
- func (cli *DockerCli) CmdInfo(args ...string) error
- func (cli *DockerCli) CmdInspect(args ...string) error
- func (cli *DockerCli) CmdKill(args ...string) error
- func (cli *DockerCli) CmdLoad(args ...string) error
- func (cli *DockerCli) CmdLogin(args ...string) error
- func (cli *DockerCli) CmdLogout(args ...string) error
- func (cli *DockerCli) CmdLogs(args ...string) error
- func (cli *DockerCli) CmdPort(args ...string) error
- func (cli *DockerCli) CmdPs(args ...string) error
- func (cli *DockerCli) CmdPull(args ...string) error
- func (cli *DockerCli) CmdPush(args ...string) error
- func (cli *DockerCli) CmdRename(args ...string) error
- func (cli *DockerCli) CmdRestart(args ...string) error
- func (cli *DockerCli) CmdRm(args ...string) error
- func (cli *DockerCli) CmdRmi(args ...string) error
- func (cli *DockerCli) CmdRun(args ...string) error
- func (cli *DockerCli) CmdSearch(args ...string) error
- func (cli *DockerCli) CmdService(args ...string) error
- func (cli *DockerCli) CmdServiceAttach_fip(args ...string) error
- func (cli *DockerCli) CmdServiceCreate(args ...string) error
- func (cli *DockerCli) CmdServiceDetach_fip(args ...string) error
- func (cli *DockerCli) CmdServiceInspect(args ...string) error
- func (cli *DockerCli) CmdServiceLs(args ...string) error
- func (cli *DockerCli) CmdServiceRm(args ...string) error
- func (cli *DockerCli) CmdServiceRolling_update(args ...string) error
- func (cli *DockerCli) CmdServiceScale(args ...string) error
- func (cli *DockerCli) CmdSg(args ...string) error
- func (cli *DockerCli) CmdSgCreate(args ...string) error
- func (cli *DockerCli) CmdSgInspect(args ...string) error
- func (cli *DockerCli) CmdSgLs(args ...string) error
- func (cli *DockerCli) CmdSgRm(args ...string) error
- func (cli *DockerCli) CmdSgUpdate(args ...string) error
- func (cli *DockerCli) CmdSnapshot(args ...string) error
- func (cli *DockerCli) CmdSnapshotCreate(args ...string) error
- func (cli *DockerCli) CmdSnapshotInspect(args ...string) error
- func (cli *DockerCli) CmdSnapshotLs(args ...string) error
- func (cli *DockerCli) CmdSnapshotRm(args ...string) error
- func (cli *DockerCli) CmdStart(args ...string) error
- func (cli *DockerCli) CmdStats(args ...string) error
- func (cli *DockerCli) CmdStop(args ...string) error
- func (cli *DockerCli) CmdUpdate(args ...string) error
- func (cli *DockerCli) CmdVersion(args ...string) (err error)
- func (cli *DockerCli) CmdVolume(args ...string) error
- func (cli *DockerCli) CmdVolumeCreate(args ...string) error
- func (cli *DockerCli) CmdVolumeInit(args ...string) error
- func (cli *DockerCli) CmdVolumeInspect(args ...string) error
- func (cli *DockerCli) CmdVolumeLs(args ...string) error
- func (cli *DockerCli) CmdVolumeRm(args ...string) error
- func (cli *DockerCli) CmdWait(args ...string) error
- func (cli *DockerCli) Cp(args ...string) error
- func (cli *DockerCli) Create(s project.Service) client.APIClient
- func (cli *DockerCli) Diff(args ...string) error
- func (cli *DockerCli) Events(ctx context.Context) (<-chan events.Message, <-chan error)
- func (cli *DockerCli) ExecCmd(ctx context.Context, user, contID string, cmd []string) (string, error)
- func (cli *DockerCli) Export(args ...string) error
- func (cli *DockerCli) ImageLoadFromDaemon(ctx context.Context, name string, quiet bool) (*types.ImageLoadResponse, error)
- func (cli *DockerCli) ImageLoadFromTar(ctx context.Context, tr io.Reader, quiet bool) (*types.ImageLoadResponse, error)
- func (cli *DockerCli) ImagesFormat() string
- func (cli *DockerCli) Import(args ...string) error
- func (cli *DockerCli) Initialize() error
- func (cli *DockerCli) Network(args ...string) error
- func (cli *DockerCli) NetworkConnect(args ...string) error
- func (cli *DockerCli) NetworkCreate(args ...string) error
- func (cli *DockerCli) NetworkDisconnect(args ...string) error
- func (cli *DockerCli) NetworkInspect(args ...string) error
- func (cli *DockerCli) NetworkLs(args ...string) error
- func (cli *DockerCli) NetworkRm(args ...string) error
- func (cli *DockerCli) Pause(args ...string) error
- func (cli *DockerCli) PsFormat() string
- func (cli *DockerCli) Save(args ...string) error
- func (cli *DockerCli) Tag(args ...string) error
- func (cli *DockerCli) Top(args ...string) error
- func (cli *DockerCli) Unpause(args ...string) error
- func (cli *DockerCli) VolumesFormat() string
- func (cli *DockerCli) WaitExec(ctx context.Context, execID string) error
- type InitVolume
- type TarFile
Constants ¶
const ( TARINFO_HEADER = iota TARINFO_FILE TARINFO_PAD TARINFO_UPLOADED TARINFO_FINISHED )
const ComposeFipAuto = "auto"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DockerCli ¶
type DockerCli struct {
// contains filtered or unexported fields
}
DockerCli represents the docker command line client. Instances of the client can be returned from NewDockerCli.
func NewDockerCli ¶
func NewDockerCli(in io.ReadCloser, out, err io.Writer, clientFlags *cli.ClientFlags) *DockerCli
NewDockerCli returns a DockerCli instance with IO output and error streams set by in, out and err. The key file, protocol (i.e. unix) and address are passed in as strings, along with the tls.Config. If the tls.Config is set the client scheme will be set to https. The client will be given a 32-second timeout (see https://github.com/hyperhq/hypercli/pull/8035).
func (*DockerCli) Build ¶
CmdBuild builds a new image from the source code at a given path.
If '-' is provided instead of a path or URL, Docker will build an image from either a Dockerfile or tar archive read from STDIN.
Usage: docker build [OPTIONS] PATH | URL | -
func (*DockerCli) CheckTtyInput ¶
CheckTtyInput checks if we are trying to attach to a container tty from a non-tty client input stream, and if so, returns an error.
func (*DockerCli) CmdAttach ¶
CmdAttach attaches to a running container.
Usage: docker attach [OPTIONS] CONTAINER
func (*DockerCli) CmdCommit ¶ added in v1.10.10
CmdCommit creates a new image from a container's changes.
Usage: hyper commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
func (*DockerCli) CmdCompose ¶
CmdCompose is the parent subcommand for all compose commands
Usage: hyper compose <COMMAND> [OPTIONS]
func (*DockerCli) CmdComposePull ¶ added in v1.10.3
CmdComposePull
Usage: hyper compose pull [OPTIONS]
func (*DockerCli) CmdComposeRun ¶
CmdComposeRun
Usage: hyper compose run [OPTIONS] SERVICE [COMMAND] [ARGS...]
func (*DockerCli) CmdComposeScale ¶
CmdComposeScale
Usage: hyper compose scale [OPTIONS] [SERVICE=NUM...]
func (*DockerCli) CmdCreate ¶
CmdCreate creates a new container from a given image.
Usage: docker create [OPTIONS] IMAGE [COMMAND] [ARG...]
func (*DockerCli) CmdCron ¶ added in v1.10.5
CmdCron is the parent subcommand for all cron commands
Usage: hyper cron <COMMAND> [OPTIONS]
func (*DockerCli) CmdCronCreate ¶ added in v1.10.5
CmdCronCreate creates a new cron with a given name
Usage: hyper cron create [OPTIONS]
func (*DockerCli) CmdCronHistory ¶ added in v1.10.5
CmdCronHistory
Usage: hyper cron history [OPTIONS] CRON
func (*DockerCli) CmdCronInspect ¶ added in v1.10.5
CmdCronInspect
Usage: hyper cron inspect [OPTIONS] CRON [CRON...]
func (*DockerCli) CmdCronLs ¶ added in v1.10.5
CmdCronLs lists all the crons
Usage: hyper cron ls [OPTIONS]
func (*DockerCli) CmdCronRm ¶ added in v1.10.5
CmdCronDelete deletes one or more crons
Usage: hyper cron rm cron [cron...]
func (*DockerCli) CmdExec ¶
CmdExec runs a command in a running container.
Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
func (*DockerCli) CmdFip ¶
CmdFip is the parent subcommand for all fip commands
Usage: docker fip <COMMAND> [OPTIONS]
func (*DockerCli) CmdFipAllocate ¶
CmdNetworkCreate creates a new fip with a given name
Usage: docker fip create [OPTIONS] COUNT
func (*DockerCli) CmdFipAttach ¶
CmdFipAttach connects a container to a floating IP
Usage: docker fip attach [OPTIONS] <FIP> <CONTAINER>
func (*DockerCli) CmdFipDetach ¶
CmdFipDetach disconnects a container from a floating IP
Usage: docker fip detach <CONTAINER>
func (*DockerCli) CmdFipName ¶ added in v1.10.11
func (*DockerCli) CmdFipRelease ¶
CmdFipRelease deletes one or more fips
Usage: docker fip release FIP [FIP...]
func (*DockerCli) CmdFunc ¶ added in v1.10.9
CmdFunc is the parent subcommand for all func commands
Usage: docker func <COMMAND> [OPTIONS]
func (*DockerCli) CmdFuncCall ¶ added in v1.10.9
CmdFuncCall call a func
Usage: hyper func call NAME
func (*DockerCli) CmdFuncCreate ¶ added in v1.10.9
CmdFuncCreate creates a new func with a given name
Usage: hyper func create [OPTIONS] IMAGE [COMMAND]
func (*DockerCli) CmdFuncGet ¶ added in v1.10.9
CmdFuncGet Get the return of a func call
Usage: hyper func get [OPTIONS] CALL_ID
func (*DockerCli) CmdFuncInspect ¶ added in v1.10.9
CmdFuncInspect
Usage: docker func inspect [OPTIONS] NAME [NAME...]
func (*DockerCli) CmdFuncLogs ¶ added in v1.10.9
CmdFuncLogs Get the return of a func call
Usage: hyper func get [OPTIONS] NAME
func (*DockerCli) CmdFuncLs ¶ added in v1.10.9
CmdFuncLs lists all the funcs
Usage: hyper func ls [OPTIONS]
func (*DockerCli) CmdFuncRm ¶ added in v1.10.9
CmdFuncDelete deletes one or more funcs
Usage: hyper func rm NAME [NAME...]
func (*DockerCli) CmdFuncStatus ¶ added in v1.10.9
CmdFuncStatus Status the return of a func call
Usage: hyper func status [OPTIONS] NAME
func (*DockerCli) CmdFuncUpdate ¶ added in v1.10.9
CmdFuncUpdate updates a func with a given name
Usage: hyper func update [OPTIONS] NAME
func (*DockerCli) CmdHistory ¶
CmdHistory shows the history of an image.
Usage: docker history [OPTIONS] IMAGE
func (*DockerCli) CmdImages ¶
CmdImages lists the images in a specified repository, or all top-level images if no repository is specified.
Usage: docker images [OPTIONS] [REPOSITORY]
func (*DockerCli) CmdInspect ¶
CmdInspect displays low-level information on one or more containers or images.
Usage: docker inspect [OPTIONS] CONTAINER|IMAGE [CONTAINER|IMAGE...]
func (*DockerCli) CmdKill ¶
CmdKill kills one or more running container using SIGKILL or a specified signal.
Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...]
func (*DockerCli) CmdLoad ¶
CmdLoad load a local image or a tar file
The tar archive is read from STDIN by default, or from a tar archive file.
Usage: docker load [OPTIONS]
func (*DockerCli) CmdLogin ¶
CmdLogin logs in or registers a user to a Docker registry service.
If no server is specified, the user will be logged into or registered to the registry's index server.
Usage: docker login SERVER
func (*DockerCli) CmdLogout ¶
CmdLogout logs a user out from a Docker registry.
If no server is specified, the user will be logged out from the registry's index server.
Usage: docker logout [SERVER]
func (*DockerCli) CmdLogs ¶
CmdLogs fetches the logs of a given container.
docker logs [OPTIONS] CONTAINER
func (*DockerCli) CmdPort ¶
CmdPort lists port mappings for a container. If a private port is specified, it also shows the public-facing port that is NATed to the private port.
Usage: docker port CONTAINER [PRIVATE_PORT[/PROTO]]
func (*DockerCli) CmdPull ¶
CmdPull pulls an image or a repository from the registry.
Usage: docker pull [OPTIONS] IMAGENAME[:TAG|@DIGEST]
func (*DockerCli) CmdPush ¶ added in v1.10.10
CmdPush pushes an image or repository to the registry.
Usage: hyper push NAME[:TAG]
func (*DockerCli) CmdRestart ¶
CmdRestart restarts one or more containers.
Usage: docker restart [OPTIONS] CONTAINER [CONTAINER...]
func (*DockerCli) CmdRm ¶
CmdRm removes one or more containers.
Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...]
func (*DockerCli) CmdRmi ¶
CmdRmi removes all images with the specified name(s).
Usage: docker rmi [OPTIONS] IMAGE [IMAGE...]
func (*DockerCli) CmdRun ¶
CmdRun runs a command in a new container.
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
func (*DockerCli) CmdSearch ¶
CmdSearch searches the Docker Hub for images.
Usage: docker search [OPTIONS] TERM
func (*DockerCli) CmdService ¶ added in v1.10.3
CmdService is the parent subcommand for all service commands
Usage: docker service <COMMAND> [OPTIONS]
func (*DockerCli) CmdServiceAttach_fip ¶ added in v1.10.3
CmdServiceAttach_fip
Usage: hyper service attach_fip [OPTIONS] SERVICE [SERVICE...]
func (*DockerCli) CmdServiceCreate ¶ added in v1.10.3
CmdServiceCreate creates a new service with a given name
Usage: hyper service create [OPTIONS] COUNT
func (*DockerCli) CmdServiceDetach_fip ¶ added in v1.10.3
CmdServiceDetach_fip
Usage: hyper service detach_fip [OPTIONS] SERVICE [SERVICE...]
func (*DockerCli) CmdServiceInspect ¶ added in v1.10.3
CmdServiceInspect
Usage: docker service inspect [OPTIONS] service [service...]
func (*DockerCli) CmdServiceLs ¶ added in v1.10.3
CmdServiceLs lists all the services
Usage: hyper service ls [OPTIONS]
func (*DockerCli) CmdServiceRm ¶ added in v1.10.3
CmdServiceDelete deletes one or more services
Usage: hyper service rm service [service...]
func (*DockerCli) CmdServiceRolling_update ¶ added in v1.10.3
CmdServiceRolling_update
Usage: hyper service rolling-update [OPTIONS] SERVICE [SERVICE...]
func (*DockerCli) CmdServiceScale ¶ added in v1.10.3
CmdServiceScale
Usage: hyper service scale [OPTIONS] SERVICE=REPLICAS [SERVICE=REPLICAS...]
func (*DockerCli) CmdSg ¶ added in v1.10.2
CmdSg is the parent subcommand for all sg commands
Usage: hyper sg <COMMAND> [OPTIONS]
func (*DockerCli) CmdSgCreate ¶ added in v1.10.2
CmdSgCreate creates a new sg with a given name
Usage: hyper sg create [OPTIONS] NAME
func (*DockerCli) CmdSgInspect ¶ added in v1.10.2
CmdSgInspect Inspect security groups
Usage: hyper sg inspect [OPTIONS] NAME
func (*DockerCli) CmdSgLs ¶ added in v1.10.2
CmdSgLs list security groups
Usage: hyper sg ls [OPTIONS]
func (*DockerCli) CmdSgRm ¶ added in v1.10.2
CmdSgRm removes a sg with a given name
Usage: hyper sg rm [OPTIONS] NAME
func (*DockerCli) CmdSgUpdate ¶ added in v1.10.2
CmdSgUpdate Update the security group
Usage: hyper sg update [OPTIONS] NAME
func (*DockerCli) CmdSnapshot ¶
CmdSnapshot is the parent subcommand for all snapshot commands
Usage: docker snapshot <COMMAND> <OPTS>
func (*DockerCli) CmdSnapshotCreate ¶
CmdSnapshotCreate creates a new snapshot.
Usage: docker snapshot create [OPTIONS]
func (*DockerCli) CmdSnapshotInspect ¶
CmdSnapshotInspect displays low-level information on one or more snapshots.
Usage: docker snapshot inspect [OPTIONS] snapshot [snapshot...]
func (*DockerCli) CmdSnapshotLs ¶
CmdSnapshotLs outputs a list of Docker snapshots.
Usage: hyper snapshot ls [OPTIONS]
func (*DockerCli) CmdSnapshotRm ¶
CmdSnapshotRm removes one or more snapshots.
Usage: docker snapshot rm snapshot [snapshot...]
func (*DockerCli) CmdStart ¶
CmdStart starts one or more containers.
Usage: docker start [OPTIONS] CONTAINER [CONTAINER...]
func (*DockerCli) CmdStats ¶
CmdStats displays a live stream of resource usage statistics for one or more containers.
This shows real-time information on CPU usage, memory usage, and network I/O.
Usage: hyper stats [OPTIONS] [CONTAINER...]
func (*DockerCli) CmdStop ¶
CmdStop stops one or more containers.
A running container is stopped by first sending SIGTERM and then SIGKILL if the container fails to stop within a grace period (the default is 10 seconds).
Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...]
func (*DockerCli) CmdUpdate ¶ added in v1.10.2
CmdUpdate updates resources of one or more containers.
Usage: hyper update [OPTIONS] CONTAINER [CONTAINER...]
func (*DockerCli) CmdVersion ¶
CmdVersion shows Docker version information.
Available version information is shown for: client Docker version, client API version, client Go version, client Git commit, client OS/Arch, server Docker version, server API version, server Go version, server Git commit, and server OS/Arch.
Usage: docker version
func (*DockerCli) CmdVolume ¶
CmdVolume is the parent subcommand for all volume commands
Usage: docker volume <COMMAND> <OPTS>
func (*DockerCli) CmdVolumeCreate ¶
CmdVolumeCreate creates a new volume.
Usage: docker volume create [OPTIONS]
func (*DockerCli) CmdVolumeInit ¶
CmdVolumeInit Initializes one or more volumes.
Usage: docker volume init SOURCE:VOLUME [SOURCE:VOLUME...]
func (*DockerCli) CmdVolumeInspect ¶
CmdVolumeInspect displays low-level information on one or more volumes.
Usage: docker volume inspect [OPTIONS] VOLUME [VOLUME...]
func (*DockerCli) CmdVolumeLs ¶
CmdVolumeLs outputs a list of Docker volumes.
Usage: docker volume ls [OPTIONS]
func (*DockerCli) CmdVolumeRm ¶
CmdVolumeRm removes one or more volumes.
Usage: docker volume rm VOLUME [VOLUME...]
func (*DockerCli) CmdWait ¶ added in v1.10.9
CmdWait blocks until a container stops, then prints its exit code.
If more than one container is specified, this will wait synchronously on each container.
Usage: docker wait CONTAINER [CONTAINER...]
func (*DockerCli) Cp ¶
CmdCp copies files/folders to or from a path in a container.
When copying from a container, if DEST_PATH is '-' the data is written as a tar archive file to STDOUT.
When copying to a container, if SRC_PATH is '-' the data is read as a tar archive file from STDIN, and the destination CONTAINER:DEST_PATH, must specify a directory.
Usage:
docker cp CONTAINER:SRC_PATH DEST_PATH|- docker cp SRC_PATH|- CONTAINER:DEST_PATH
func (*DockerCli) Diff ¶
CmdDiff shows changes on a container's filesystem.
Each changed file is printed on a separate line, prefixed with a single character that indicates the status of the file: C (modified), A (added), or D (deleted).
Usage: docker diff CONTAINER
func (*DockerCli) Events ¶
Events returns a stream of events in the daemon. It's up to the caller to close the stream by cancelling the context. Once the stream has been completely read an io.EOF error will be sent over the error channel. If an error is sent all processing will be stopped. It's up to the caller to reopen the stream in the event of an error by reinvoking this method.
func (*DockerCli) Export ¶
CmdExport exports a filesystem as a tar archive.
The tar archive is streamed to STDOUT by default or written to a file.
Usage: docker export [OPTIONS] CONTAINER
func (*DockerCli) ImageLoadFromDaemon ¶ added in v1.10.12
func (cli *DockerCli) ImageLoadFromDaemon(ctx context.Context, name string, quiet bool) (*types.ImageLoadResponse, error)
ImageDiff diff an image layers with local and imaged
func (*DockerCli) ImageLoadFromTar ¶ added in v1.10.12
func (*DockerCli) ImagesFormat ¶
ImagesFormat returns the format string specified in the configuration. String contains columns and format specification, for example {{ID}}\t{{Name}}.
func (*DockerCli) Import ¶
CmdImport creates an empty filesystem image, imports the contents of the tarball into the image, and optionally tags the image.
The URL argument is the address of a tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz) file or a path to local file relative to docker client. If the URL is '-', then the tar file is read from STDIN.
Usage: docker import [OPTIONS] file|URL|- [REPOSITORY[:TAG]]
func (*DockerCli) Initialize ¶
Initialize calls the init function that will setup the configuration for the client such as the TLS, tcp and other parameters used to run the client.
func (*DockerCli) Network ¶
CmdNetwork is the parent subcommand for all network commands
Usage: docker network <COMMAND> [OPTIONS]
func (*DockerCli) NetworkConnect ¶
CmdNetworkConnect connects a container to a network
Usage: docker network connect [OPTIONS] <NETWORK> <CONTAINER>
func (*DockerCli) NetworkCreate ¶
CmdNetworkCreate creates a new network with a given name
Usage: docker network create [OPTIONS] <NETWORK-NAME>
func (*DockerCli) NetworkDisconnect ¶
CmdNetworkDisconnect disconnects a container from a network
Usage: docker network disconnect <NETWORK> <CONTAINER>
func (*DockerCli) NetworkInspect ¶
CmdNetworkInspect inspects the network object for more details
Usage: docker network inspect [OPTIONS] <NETWORK> [NETWORK...]
func (*DockerCli) NetworkLs ¶
CmdNetworkLs lists all the networks managed by docker daemon
Usage: docker network ls [OPTIONS]
func (*DockerCli) NetworkRm ¶
CmdNetworkRm deletes one or more networks
Usage: docker network rm NETWORK-NAME|NETWORK-ID [NETWORK-NAME|NETWORK-ID...]
func (*DockerCli) Pause ¶
CmdPause pauses all processes within one or more containers.
Usage: docker pause CONTAINER [CONTAINER...]
func (*DockerCli) PsFormat ¶
PsFormat returns the format string specified in the configuration. String contains columns and format specification, for example {{ID}}\t{{Name}}.
func (*DockerCli) Save ¶
CmdSave saves one or more images to a tar archive.
The tar archive is written to STDOUT by default, or written to a file.
Usage: docker save [OPTIONS] IMAGE [IMAGE...]
func (*DockerCli) Tag ¶
CmdTag tags an image into a repository.
Usage: docker tag [OPTIONS] IMAGE[:TAG] [REGISTRYHOST/][USERNAME/]NAME[:TAG]
func (*DockerCli) Top ¶
CmdTop displays the running processes of a container.
Usage: docker top CONTAINER
func (*DockerCli) Unpause ¶
CmdUnpause unpauses all processes within a container, for one or more containers.
Usage: docker unpause CONTAINER [CONTAINER...]
func (*DockerCli) VolumesFormat ¶ added in v1.10.9
VolumesFormat returns the format string specified in the configuration. String contains columns and format specification, for example {{ID}}\t{{Name}}.
type InitVolume ¶
Source Files ¶
- attach.go
- build.go
- cli.go
- client.go
- commit.go
- compose.go
- config.go
- cp.go
- create.go
- cron.go
- diff.go
- events.go
- exec.go
- export.go
- fip.go
- func.go
- hijack.go
- history.go
- images.go
- import.go
- info.go
- inspect.go
- kill.go
- load.go
- login.go
- logout.go
- logs.go
- network.go
- pause.go
- port.go
- ps.go
- pull.go
- push.go
- rename.go
- restart.go
- rm.go
- rmi.go
- run.go
- save.go
- search.go
- service.go
- sg.go
- snapshot.go
- start.go
- stats.go
- stats_helper.go
- stop.go
- tag.go
- tarfile.go
- top.go
- trust.go
- unpause.go
- update.go
- utils.go
- utils_unix.go
- version.go
- volume.go
- wait.go