mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Rename Remote API to Engine API
Implementation of https://github.com/docker/docker/issues/28319 Signed-off-by: Ben Firshman <ben@firshman.co.uk>
This commit is contained in:
parent
993854f58f
commit
f0d55cd081
33 changed files with 92 additions and 100 deletions
|
@ -10,18 +10,18 @@ consumes:
|
|||
- "text/plain"
|
||||
basePath: "/v1.26"
|
||||
info:
|
||||
title: "Docker Remote API"
|
||||
title: "Docker Engine API"
|
||||
version: "1.26"
|
||||
x-logo:
|
||||
url: "https://docs.docker.com/images/logo-docker-main.png"
|
||||
description: |
|
||||
The Docker API is an HTTP REST API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API.
|
||||
The Engine API is an HTTP REST API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API.
|
||||
|
||||
Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. [There is example of using `curl` to run a container in the SDK documentation.](#TODO)
|
||||
Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls.
|
||||
|
||||
# Errors
|
||||
|
||||
The Remote API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format:
|
||||
The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format:
|
||||
|
||||
```
|
||||
{
|
||||
|
@ -1262,7 +1262,7 @@ definitions:
|
|||
x-nullable: false
|
||||
|
||||
Plugin:
|
||||
description: "A plugin for the Remote API"
|
||||
description: "A plugin for the Engine API"
|
||||
type: "object"
|
||||
required: [Settings, Enabled, Config, Name, Tag]
|
||||
properties:
|
||||
|
|
|
@ -351,7 +351,7 @@ type SecretRequestOption struct {
|
|||
Mode os.FileMode
|
||||
}
|
||||
|
||||
// SwarmUnlockKeyResponse contains the response for Remote API:
|
||||
// SwarmUnlockKeyResponse contains the response for Engine API:
|
||||
// GET /swarm/unlockkey
|
||||
type SwarmUnlockKeyResponse struct {
|
||||
// UnlockKey is the unlock key in ASCII-armored format.
|
||||
|
|
|
@ -3,7 +3,7 @@ package types
|
|||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
// Plugin A plugin for the Remote API
|
||||
// Plugin A plugin for the Engine API
|
||||
// swagger:model Plugin
|
||||
type Plugin struct {
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"fmt"
|
||||
)
|
||||
|
||||
// PluginsListResponse contains the response for the remote API
|
||||
// PluginsListResponse contains the response for the Engine API
|
||||
type PluginsListResponse []*Plugin
|
||||
|
||||
const (
|
||||
|
|
|
@ -17,14 +17,14 @@ import (
|
|||
"github.com/docker/go-connections/nat"
|
||||
)
|
||||
|
||||
// ContainerChange contains response of Remote API:
|
||||
// ContainerChange contains response of Engine API:
|
||||
// GET "/containers/{name:.*}/changes"
|
||||
type ContainerChange struct {
|
||||
Kind int
|
||||
Path string
|
||||
}
|
||||
|
||||
// ImageHistory contains response of Remote API:
|
||||
// ImageHistory contains response of Engine API:
|
||||
// GET "/images/{name:.*}/history"
|
||||
type ImageHistory struct {
|
||||
ID string `json:"Id"`
|
||||
|
@ -35,7 +35,7 @@ type ImageHistory struct {
|
|||
Comment string
|
||||
}
|
||||
|
||||
// ImageDelete contains response of Remote API:
|
||||
// ImageDelete contains response of Engine API:
|
||||
// DELETE "/images/{name:.*}"
|
||||
type ImageDelete struct {
|
||||
Untagged string `json:",omitempty"`
|
||||
|
@ -56,7 +56,7 @@ type RootFS struct {
|
|||
BaseLayer string `json:",omitempty"`
|
||||
}
|
||||
|
||||
// ImageInspect contains response of Remote API:
|
||||
// ImageInspect contains response of Engine API:
|
||||
// GET "/images/{name:.*}/json"
|
||||
type ImageInspect struct {
|
||||
ID string `json:"Id"`
|
||||
|
@ -79,7 +79,7 @@ type ImageInspect struct {
|
|||
RootFS RootFS
|
||||
}
|
||||
|
||||
// Container contains response of Remote API:
|
||||
// Container contains response of Engine API:
|
||||
// GET "/containers/json"
|
||||
type Container struct {
|
||||
ID string `json:"Id"`
|
||||
|
@ -101,7 +101,7 @@ type Container struct {
|
|||
Mounts []MountPoint
|
||||
}
|
||||
|
||||
// CopyConfig contains request body of Remote API:
|
||||
// CopyConfig contains request body of Engine API:
|
||||
// POST "/containers/"+containerID+"/copy"
|
||||
type CopyConfig struct {
|
||||
Resource string
|
||||
|
@ -118,28 +118,28 @@ type ContainerPathStat struct {
|
|||
LinkTarget string `json:"linkTarget"`
|
||||
}
|
||||
|
||||
// ContainerStats contains response of Remote API:
|
||||
// ContainerStats contains response of Engine API:
|
||||
// GET "/stats"
|
||||
type ContainerStats struct {
|
||||
Body io.ReadCloser `json:"body"`
|
||||
OSType string `json:"ostype"`
|
||||
}
|
||||
|
||||
// ContainerProcessList contains response of Remote API:
|
||||
// ContainerProcessList contains response of Engine API:
|
||||
// GET "/containers/{name:.*}/top"
|
||||
type ContainerProcessList struct {
|
||||
Processes [][]string
|
||||
Titles []string
|
||||
}
|
||||
|
||||
// Ping contains response of Remote API:
|
||||
// Ping contains response of Engine API:
|
||||
// GET "/_ping"
|
||||
type Ping struct {
|
||||
APIVersion string
|
||||
Experimental bool
|
||||
}
|
||||
|
||||
// Version contains response of Remote API:
|
||||
// Version contains response of Engine API:
|
||||
// GET "/version"
|
||||
type Version struct {
|
||||
Version string
|
||||
|
@ -161,7 +161,7 @@ type Commit struct {
|
|||
Expected string
|
||||
}
|
||||
|
||||
// Info contains response of Remote API:
|
||||
// Info contains response of Engine API:
|
||||
// GET "/info"
|
||||
type Info struct {
|
||||
ID string
|
||||
|
@ -339,7 +339,7 @@ type ContainerNode struct {
|
|||
Labels map[string]string
|
||||
}
|
||||
|
||||
// ContainerJSONBase contains response of Remote API:
|
||||
// ContainerJSONBase contains response of Engine API:
|
||||
// GET "/containers/{name:.*}/json"
|
||||
type ContainerJSONBase struct {
|
||||
ID string `json:"Id"`
|
||||
|
@ -500,7 +500,7 @@ type Runtime struct {
|
|||
Args []string `json:"runtimeArgs,omitempty"`
|
||||
}
|
||||
|
||||
// DiskUsage contains response of Remote API:
|
||||
// DiskUsage contains response of Engine API:
|
||||
// GET "/system/df"
|
||||
type DiskUsage struct {
|
||||
LayersSize int64
|
||||
|
@ -509,49 +509,49 @@ type DiskUsage struct {
|
|||
Volumes []*Volume
|
||||
}
|
||||
|
||||
// ImagesPruneConfig contains the configuration for Remote API:
|
||||
// ImagesPruneConfig contains the configuration for Engine API:
|
||||
// POST "/images/prune"
|
||||
type ImagesPruneConfig struct {
|
||||
DanglingOnly bool
|
||||
}
|
||||
|
||||
// ContainersPruneConfig contains the configuration for Remote API:
|
||||
// ContainersPruneConfig contains the configuration for Engine API:
|
||||
// POST "/images/prune"
|
||||
type ContainersPruneConfig struct {
|
||||
}
|
||||
|
||||
// VolumesPruneConfig contains the configuration for Remote API:
|
||||
// VolumesPruneConfig contains the configuration for Engine API:
|
||||
// POST "/images/prune"
|
||||
type VolumesPruneConfig struct {
|
||||
}
|
||||
|
||||
// NetworksPruneConfig contains the configuration for Remote API:
|
||||
// NetworksPruneConfig contains the configuration for Engine API:
|
||||
// POST "/networks/prune"
|
||||
type NetworksPruneConfig struct {
|
||||
}
|
||||
|
||||
// ContainersPruneReport contains the response for Remote API:
|
||||
// ContainersPruneReport contains the response for Engine API:
|
||||
// POST "/containers/prune"
|
||||
type ContainersPruneReport struct {
|
||||
ContainersDeleted []string
|
||||
SpaceReclaimed uint64
|
||||
}
|
||||
|
||||
// VolumesPruneReport contains the response for Remote API:
|
||||
// VolumesPruneReport contains the response for Engine API:
|
||||
// POST "/volumes/prune"
|
||||
type VolumesPruneReport struct {
|
||||
VolumesDeleted []string
|
||||
SpaceReclaimed uint64
|
||||
}
|
||||
|
||||
// ImagesPruneReport contains the response for Remote API:
|
||||
// ImagesPruneReport contains the response for Engine API:
|
||||
// POST "/images/prune"
|
||||
type ImagesPruneReport struct {
|
||||
ImagesDeleted []ImageDelete
|
||||
SpaceReclaimed uint64
|
||||
}
|
||||
|
||||
// NetworksPruneReport contains the response for Remote API:
|
||||
// NetworksPruneReport contains the response for Engine API:
|
||||
// POST "/networks/prune"
|
||||
type NetworksPruneReport struct {
|
||||
NetworksDeleted []string
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Go client for the Docker Remote API
|
||||
# Go client for the Docker Engine API
|
||||
|
||||
The `docker` command uses this package to communicate with the daemon. It can also be used by your own Go applications to do anything the command-line interface does – running containers, pulling images, managing swarms, etc.
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/*
|
||||
Package client is a Go client for the Docker Remote API.
|
||||
Package client is a Go client for the Docker Engine API.
|
||||
|
||||
The "docker" command uses this package to communicate with the daemon. It can also
|
||||
be used by your own Go applications to do anything the command-line interface does
|
||||
- running containers, pulling images, managing swarms, etc.
|
||||
|
||||
For more information about the Remote API, see the documentation:
|
||||
https://docs.docker.com/engine/reference/api/docker_remote_api/
|
||||
For more information about the Engine API, see the documentation:
|
||||
https://docs.docker.com/engine/reference/api/
|
||||
|
||||
Usage
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ func (DetachError) Error() string {
|
|||
type CommonContainer struct {
|
||||
StreamConfig *stream.Config
|
||||
// embed for Container to support states directly.
|
||||
*State `json:"State"` // Needed for remote api version <= 1.11
|
||||
*State `json:"State"` // Needed for Engine API version <= 1.11
|
||||
Root string `json:"-"` // Path to the "home" of the container, including metadata.
|
||||
BaseFS string `json:"-"` // Path to the graphdriver mountpoint
|
||||
RWLayer layer.RWLayer `json:"-"`
|
||||
|
|
|
@ -43,7 +43,7 @@ function __fish_print_docker_repositories --description 'Print a list of docker
|
|||
end
|
||||
|
||||
# common options
|
||||
complete -c docker -f -n '__fish_docker_no_subcommand' -l api-cors-header -d "Set CORS headers in the remote API. Default is cors disabled"
|
||||
complete -c docker -f -n '__fish_docker_no_subcommand' -l api-cors-header -d "Set CORS headers in the Engine API. Default is cors disabled"
|
||||
complete -c docker -f -n '__fish_docker_no_subcommand' -s b -l bridge -d 'Attach containers to a pre-existing network bridge'
|
||||
complete -c docker -f -n '__fish_docker_no_subcommand' -l bip -d "Use this CIDR notation address for the network bridge's IP, not compatible with -b"
|
||||
complete -c docker -f -n '__fish_docker_no_subcommand' -s D -l debug -d 'Enable debug mode'
|
||||
|
|
|
@ -2200,7 +2200,7 @@ __docker_subcommand() {
|
|||
_arguments $(__docker_arguments) \
|
||||
$opts_help \
|
||||
"($help)*--add-runtime=[Register an additional OCI compatible runtime]:runtime:__docker_complete_runtimes" \
|
||||
"($help)--api-cors-header=[CORS headers in the remote API]:CORS headers: " \
|
||||
"($help)--api-cors-header=[CORS headers in the Engine API]:CORS headers: " \
|
||||
"($help)*--authorization-plugin=[Authorization plugins to load]" \
|
||||
"($help -b --bridge)"{-b=,--bridge=}"[Attach containers to a network bridge]:bridge:_net_interfaces" \
|
||||
"($help)--bip=[Network bridge IP]:IP address: " \
|
||||
|
|
|
@ -18,7 +18,7 @@ meaning you can use Vagrant to control Docker containers.
|
|||
* [docker-provider](https://github.com/fgrehm/docker-provider)
|
||||
* [vagrant-shell](https://github.com/destructuring/vagrant-shell)
|
||||
|
||||
## Setting up Vagrant-docker with the Remote API
|
||||
## Setting up Vagrant-docker with the Engine API
|
||||
|
||||
The initial Docker upstart script will not work because it runs on `127.0.0.1`, which is not accessible to the host machine. Instead, we need to change the script to connect to `0.0.0.0`. To do this, modify `/etc/init/docker.conf` to look like this:
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ func (config *Config) InstallCommonFlags(flags *pflag.FlagSet) {
|
|||
flags.StringVar(&config.ClusterAdvertise, "cluster-advertise", "", "Address or interface name to advertise")
|
||||
flags.StringVar(&config.ClusterStore, "cluster-store", "", "URL of the distributed storage backend")
|
||||
flags.Var(opts.NewNamedMapOpts("cluster-store-opts", config.ClusterOpts, nil), "cluster-store-opt", "Set cluster store options")
|
||||
flags.StringVar(&config.CorsHeaders, "api-cors-header", "", "Set CORS headers in the remote API")
|
||||
flags.StringVar(&config.CorsHeaders, "api-cors-header", "", "Set CORS headers in the Engine API")
|
||||
flags.IntVar(&maxConcurrentDownloads, "max-concurrent-downloads", defaultMaxConcurrentDownloads, "Set the max concurrent downloads for each pull")
|
||||
flags.IntVar(&maxConcurrentUploads, "max-concurrent-uploads", defaultMaxConcurrentUploads, "Set the max concurrent uploads for each push")
|
||||
flags.IntVar(&config.ShutdownTimeout, "shutdown-timeout", defaultShutdownTimeout, "Set the default shutdown timeout")
|
||||
|
|
|
@ -77,7 +77,7 @@ func (config *Config) InstallFlags(flags *pflag.FlagSet) {
|
|||
flags.StringVar(&config.bridgeConfig.FixedCIDRv6, "fixed-cidr-v6", "", "IPv6 subnet for fixed IPs")
|
||||
flags.BoolVar(&config.bridgeConfig.EnableUserlandProxy, "userland-proxy", true, "Use userland proxy for loopback traffic")
|
||||
flags.StringVar(&config.bridgeConfig.UserlandProxyPath, "userland-proxy-path", "", "Path to the userland proxy binary")
|
||||
flags.BoolVar(&config.EnableCors, "api-enable-cors", false, "Enable CORS headers in the remote API, this is deprecated by --api-cors-header")
|
||||
flags.BoolVar(&config.EnableCors, "api-enable-cors", false, "Enable CORS headers in the Engine API, this is deprecated by --api-cors-header")
|
||||
flags.MarkDeprecated("api-enable-cors", "Please use --api-cors-header")
|
||||
flags.StringVar(&config.CgroupParent, "cgroup-parent", "", "Set parent cgroup for all containers")
|
||||
flags.StringVar(&config.RemappedRoot, "userns-remap", "", "User/Group setting for user namespaces")
|
||||
|
|
|
@ -226,7 +226,7 @@ func (daemon *Daemon) setRWLayer(container *container.Container) error {
|
|||
}
|
||||
|
||||
// VolumeCreate creates a volume with the specified name, driver, and opts
|
||||
// This is called directly from the remote API
|
||||
// This is called directly from the Engine API
|
||||
func (daemon *Daemon) VolumeCreate(name, driverName string, opts, labels map[string]string) (*types.Volume, error) {
|
||||
if name == "" {
|
||||
name = stringid.GenerateNonCryptoID()
|
||||
|
|
|
@ -140,7 +140,7 @@ func (daemon *Daemon) cleanupContainer(container *container.Container, forceRemo
|
|||
|
||||
// VolumeRm removes the volume with the given name.
|
||||
// If the volume is referenced by a container it is not removed
|
||||
// This is called directly from the remote API
|
||||
// This is called directly from the Engine API
|
||||
func (daemon *Daemon) VolumeRm(name string, force bool) error {
|
||||
err := daemon.volumeRm(name)
|
||||
if err == nil || force {
|
||||
|
|
|
@ -27,7 +27,7 @@ const termProcessTimeout = 10
|
|||
func (d *Daemon) registerExecCommand(container *container.Container, config *exec.Config) {
|
||||
// Storing execs in container in order to kill them gracefully whenever the container is stopped or removed.
|
||||
container.ExecCommands.Add(config.ID, config)
|
||||
// Storing execs in daemon for easy access via remote API.
|
||||
// Storing execs in daemon for easy access via Engine API.
|
||||
d.execCommands.Add(config.ID, config)
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ func (daemon *Daemon) ContainerStats(ctx context.Context, prefixOrName string, c
|
|||
if runtime.GOOS == "solaris" {
|
||||
return fmt.Errorf("%+v does not support stats", runtime.GOOS)
|
||||
}
|
||||
// Remote API version (used for backwards compatibility)
|
||||
// Engine API version (used for backwards compatibility)
|
||||
apiVersion := config.Version
|
||||
|
||||
container, err := daemon.GetContainer(prefixOrName)
|
||||
|
|
|
@ -26,7 +26,7 @@ var (
|
|||
|
||||
type mounts []container.Mount
|
||||
|
||||
// volumeToAPIType converts a volume.Volume to the type used by the remote API
|
||||
// volumeToAPIType converts a volume.Volume to the type used by the Engine API
|
||||
func volumeToAPIType(v volume.Volume) *types.Volume {
|
||||
tv := &types.Volume{
|
||||
Name: v.Name(),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: "Remote API v1.18"
|
||||
title: "Engine API v1.18"
|
||||
description: "API Documentation for Docker"
|
||||
keywords: "API, Docker, rcli, REST, documentation"
|
||||
redirect_from:
|
||||
|
@ -16,11 +16,10 @@ redirect_from:
|
|||
will be rejected.
|
||||
-->
|
||||
|
||||
# Docker Remote API v1.18
|
||||
# Docker Engine API v1.18
|
||||
|
||||
# 1. Brief introduction
|
||||
|
||||
- The Remote API has replaced `rcli`.
|
||||
- The daemon listens on `unix:///var/run/docker.sock` but you can
|
||||
[Bind Docker to another host/port or a Unix socket](../commandline/dockerd.md#bind-docker-to-another-host-port-or-a-unix-socket).
|
||||
- The API tends to be REST, but for some complex commands, like `attach`
|
||||
|
@ -2151,7 +2150,7 @@ This might change in the future.
|
|||
|
||||
## 3.3 CORS Requests
|
||||
|
||||
To set cross origin requests to the remote api please give values to
|
||||
To set cross origin requests to the Engine API please give values to
|
||||
`--api-cors-header` when running Docker in daemon mode. Set * (asterisk) allows all,
|
||||
default or blank means CORS disabled
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: "Remote API v1.19"
|
||||
title: "Engine API v1.19"
|
||||
description: "API Documentation for Docker"
|
||||
keywords: "API, Docker, rcli, REST, documentation"
|
||||
redirect_from:
|
||||
|
@ -16,11 +16,10 @@ redirect_from:
|
|||
will be rejected.
|
||||
-->
|
||||
|
||||
# Docker Remote API v1.19
|
||||
# Docker Engine API v1.19
|
||||
|
||||
## 1. Brief introduction
|
||||
|
||||
- The Remote API has replaced `rcli`.
|
||||
- The daemon listens on `unix:///var/run/docker.sock` but you can
|
||||
[Bind Docker to another host/port or a Unix socket](../commandline/dockerd.md#bind-docker-to-another-host-port-or-a-unix-socket).
|
||||
- The API tends to be REST. However, for some complex commands, like `attach`
|
||||
|
@ -2233,7 +2232,7 @@ from **200 OK** to **101 UPGRADED** and resends the same headers.
|
|||
|
||||
## 3.3 CORS Requests
|
||||
|
||||
To set cross origin requests to the remote api please give values to
|
||||
To set cross origin requests to the Engine API please give values to
|
||||
`--api-cors-header` when running Docker in daemon mode. Set * (asterisk) allows all,
|
||||
default or blank means CORS disabled
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: "Remote API v1.20"
|
||||
title: "Engine API v1.20"
|
||||
description: "API Documentation for Docker"
|
||||
keywords: "API, Docker, rcli, REST, documentation"
|
||||
redirect_from:
|
||||
|
@ -16,11 +16,10 @@ redirect_from:
|
|||
will be rejected.
|
||||
-->
|
||||
|
||||
# Docker Remote API v1.20
|
||||
# Docker Engine API v1.20
|
||||
|
||||
# 1. Brief introduction
|
||||
|
||||
- The Remote API has replaced `rcli`.
|
||||
- The daemon listens on `unix:///var/run/docker.sock` but you can
|
||||
[Bind Docker to another host/port or a Unix socket](../commandline/dockerd.md#bind-docker-to-another-host-port-or-a-unix-socket).
|
||||
- The API tends to be REST. However, for some complex commands, like `attach`
|
||||
|
@ -2386,7 +2385,7 @@ from **200 OK** to **101 UPGRADED** and resends the same headers.
|
|||
|
||||
## 3.3 CORS Requests
|
||||
|
||||
To set cross origin requests to the remote api please give values to
|
||||
To set cross origin requests to the Engine API please give values to
|
||||
`--api-cors-header` when running Docker in daemon mode. Set * (asterisk) allows all,
|
||||
default or blank means CORS disabled
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: "Remote API v1.21"
|
||||
title: "Engine API v1.21"
|
||||
description: "API Documentation for Docker"
|
||||
keywords: "API, Docker, rcli, REST, documentation"
|
||||
redirect_from:
|
||||
|
@ -16,11 +16,10 @@ redirect_from:
|
|||
will be rejected.
|
||||
-->
|
||||
|
||||
# Docker Remote API v1.21
|
||||
# Docker Engine API v1.21
|
||||
|
||||
## 1. Brief introduction
|
||||
|
||||
- The Remote API has replaced `rcli`.
|
||||
- The daemon listens on `unix:///var/run/docker.sock` but you can
|
||||
[Bind Docker to another host/port or a Unix socket](../commandline/dockerd.md#bind-docker-to-another-host-port-or-a-unix-socket).
|
||||
- The API tends to be REST. However, for some complex commands, like `attach`
|
||||
|
@ -2964,7 +2963,7 @@ from **200 OK** to **101 UPGRADED** and resends the same headers.
|
|||
|
||||
## 3.3 CORS Requests
|
||||
|
||||
To set cross origin requests to the remote api please give values to
|
||||
To set cross origin requests to the Engine API please give values to
|
||||
`--api-cors-header` when running Docker in daemon mode. Set * (asterisk) allows all,
|
||||
default or blank means CORS disabled
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: "Remote API v1.22"
|
||||
title: "Engine API v1.22"
|
||||
description: "API Documentation for Docker"
|
||||
keywords: "API, Docker, rcli, REST, documentation"
|
||||
redirect_from:
|
||||
|
@ -16,11 +16,10 @@ redirect_from:
|
|||
will be rejected.
|
||||
-->
|
||||
|
||||
# Docker Remote API v1.22
|
||||
# Docker Engine API v1.22
|
||||
|
||||
# 1. Brief introduction
|
||||
|
||||
- The Remote API has replaced `rcli`.
|
||||
- The daemon listens on `unix:///var/run/docker.sock` but you can
|
||||
[Bind Docker to another host/port or a Unix socket](../commandline/dockerd.md#bind-docker-to-another-host-port-or-a-unix-socket).
|
||||
- The API tends to be REST. However, for some complex commands, like `attach`
|
||||
|
@ -3302,7 +3301,7 @@ from **200 OK** to **101 UPGRADED** and resends the same headers.
|
|||
|
||||
## 3.3 CORS Requests
|
||||
|
||||
To set cross origin requests to the remote api please give values to
|
||||
To set cross origin requests to the Engine API please give values to
|
||||
`--api-cors-header` when running Docker in daemon mode. Set * (asterisk) allows all,
|
||||
default or blank means CORS disabled
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: "Remote API v1.23"
|
||||
title: "Engine API v1.23"
|
||||
description: "API Documentation for Docker"
|
||||
keywords: "API, Docker, rcli, REST, documentation"
|
||||
redirect_from:
|
||||
|
@ -16,11 +16,10 @@ redirect_from:
|
|||
will be rejected.
|
||||
-->
|
||||
|
||||
# Docker Remote API v1.23
|
||||
# Docker Engine API v1.23
|
||||
|
||||
## 1. Brief introduction
|
||||
|
||||
- The Remote API has replaced `rcli`.
|
||||
- The daemon listens on `unix:///var/run/docker.sock` but you can
|
||||
[Bind Docker to another host/port or a Unix socket](../commandline/dockerd.md#bind-docker-to-another-host-port-or-a-unix-socket).
|
||||
- The API tends to be REST. However, for some complex commands, like `attach`
|
||||
|
@ -3419,7 +3418,7 @@ from **200 OK** to **101 UPGRADED** and resends the same headers.
|
|||
|
||||
## 3.3 CORS Requests
|
||||
|
||||
To set cross origin requests to the remote api please give values to
|
||||
To set cross origin requests to the Engine API please give values to
|
||||
`--api-cors-header` when running Docker in daemon mode. Set * (asterisk) allows all,
|
||||
default or blank means CORS disabled
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: "Remote API v1.24"
|
||||
title: "Engine API v1.24"
|
||||
description: "API Documentation for Docker"
|
||||
keywords: "API, Docker, rcli, REST, documentation"
|
||||
redirect_from:
|
||||
|
@ -16,11 +16,10 @@ redirect_from:
|
|||
will be rejected.
|
||||
-->
|
||||
|
||||
# Docker Remote API v1.24
|
||||
# Docker Engine API v1.24
|
||||
|
||||
# 1. Brief introduction
|
||||
|
||||
- The Remote API has replaced `rcli`.
|
||||
- The daemon listens on `unix:///var/run/docker.sock` but you can
|
||||
[Bind Docker to another host/port or a Unix socket](../commandline/dockerd.md#bind-docker-to-another-host-port-or-a-unix-socket).
|
||||
- The API tends to be REST. However, for some complex commands, like `attach`
|
||||
|
@ -29,7 +28,7 @@ redirect_from:
|
|||
|
||||
# 2. Errors
|
||||
|
||||
The Remote API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format:
|
||||
The Engine API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format:
|
||||
|
||||
{
|
||||
"message": "page not found"
|
||||
|
@ -5277,7 +5276,7 @@ from **200 OK** to **101 UPGRADED** and resends the same headers.
|
|||
|
||||
## 4.3 CORS Requests
|
||||
|
||||
To set cross origin requests to the remote api please give values to
|
||||
To set cross origin requests to the Engine API please give values to
|
||||
`--api-cors-header` when running Docker in daemon mode. Set * (asterisk) allows all,
|
||||
default or blank means CORS disabled
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: "Remote API version history"
|
||||
title: "Engine API version history"
|
||||
description: "Documentation of changes that have been made to Engine API."
|
||||
keywords: "API, Docker, rcli, REST, documentation"
|
||||
---
|
||||
|
@ -15,12 +15,11 @@ keywords: "API, Docker, rcli, REST, documentation"
|
|||
|
||||
## v1.26 API changes
|
||||
|
||||
[Docker Remote API v1.26](docker_remote_api_v1.26.md) documentation
|
||||
|
||||
[Docker Engine API v1.26](v1.26/) documentation
|
||||
|
||||
## v1.25 API changes
|
||||
|
||||
[Docker Remote API v1.25](docker_remote_api_v1.25.md) documentation
|
||||
[Docker Engine API v1.25](v1.25.md) documentation
|
||||
|
||||
* The API version is now required in all API calls. Instead of just requesting, for example, the URL `/containers/json`, you must now request `/v1.25/containers/json`.
|
||||
* `GET /version` now returns `MinAPIVersion`.
|
||||
|
@ -81,7 +80,7 @@ keywords: "API, Docker, rcli, REST, documentation"
|
|||
|
||||
## v1.24 API changes
|
||||
|
||||
[Docker Remote API v1.24](docker_remote_api_v1.24.md) documentation
|
||||
[Docker Engine API v1.24](v1.24.md) documentation
|
||||
|
||||
* `POST /containers/create` now takes `StorageOpt` field.
|
||||
* `GET /info` now returns `SecurityOptions` field, showing if `apparmor`, `seccomp`, or `selinux` is supported.
|
||||
|
@ -113,7 +112,7 @@ keywords: "API, Docker, rcli, REST, documentation"
|
|||
|
||||
## v1.23 API changes
|
||||
|
||||
[Docker Remote API v1.23](docker_remote_api_v1.23.md) documentation
|
||||
[Docker Engine API v1.23](v1.23.md) documentation
|
||||
|
||||
* `GET /containers/json` returns the state of the container, one of `created`, `restarting`, `running`, `paused`, `exited` or `dead`.
|
||||
* `GET /containers/json` returns the mount points for the container.
|
||||
|
@ -135,7 +134,7 @@ keywords: "API, Docker, rcli, REST, documentation"
|
|||
|
||||
## v1.22 API changes
|
||||
|
||||
[Docker Remote API v1.22](docker_remote_api_v1.22.md) documentation
|
||||
[Docker Engine API v1.22](v1.22.md) documentation
|
||||
|
||||
* `POST /container/(name)/update` updates the resources of a container.
|
||||
* `GET /containers/json` supports filter `isolation` on Windows.
|
||||
|
@ -169,7 +168,7 @@ keywords: "API, Docker, rcli, REST, documentation"
|
|||
|
||||
## v1.21 API changes
|
||||
|
||||
[Docker Remote API v1.21](docker_remote_api_v1.21.md) documentation
|
||||
[Docker Engine API v1.21](v1.21.md) documentation
|
||||
|
||||
* `GET /volumes` lists volumes from all volume drivers.
|
||||
* `POST /volumes/create` to create a volume.
|
||||
|
@ -204,7 +203,7 @@ keywords: "API, Docker, rcli, REST, documentation"
|
|||
|
||||
## v1.20 API changes
|
||||
|
||||
[Docker Remote API v1.20](docker_remote_api_v1.20.md) documentation
|
||||
[Docker Engine API v1.20](v1.20.md) documentation
|
||||
|
||||
* `GET /containers/(id)/archive` get an archive of filesystem content from a container.
|
||||
* `PUT /containers/(id)/archive` upload an archive of content to be extracted to
|
||||
|
@ -216,7 +215,7 @@ list of additional groups that the container process will run as.
|
|||
|
||||
## v1.19 API changes
|
||||
|
||||
[Docker Remote API v1.19](docker_remote_api_v1.19.md) documentation
|
||||
[Docker Engine API v1.19](v1.19.md) documentation
|
||||
|
||||
* When the daemon detects a version mismatch with the client, usually when
|
||||
the client is newer than the daemon, an HTTP 400 is now returned instead
|
||||
|
@ -232,7 +231,7 @@ end point now returns the new boolean fields `CpuCfsPeriod`, `CpuCfsQuota`, and
|
|||
|
||||
## v1.18 API changes
|
||||
|
||||
[Docker Remote API v1.18](docker_remote_api_v1.18.md) documentation
|
||||
[Docker Engine API v1.18](v1.18.md) documentation
|
||||
|
||||
* `GET /version` now returns `Os`, `Arch` and `KernelVersion`.
|
||||
* `POST /containers/create` and `POST /containers/(id)/start`allow you to set ulimit settings for use in the container.
|
||||
|
|
|
@ -22,7 +22,7 @@ refer to [Docker Engine plugin system](index.md).
|
|||
|
||||
Docker's out-of-the-box authorization model is all or nothing. Any user with
|
||||
permission to access the Docker daemon can run any Docker client command. The
|
||||
same is true for callers using Docker's remote API to contact the daemon. If you
|
||||
same is true for callers using Docker's Engine API to contact the daemon. If you
|
||||
require greater access control, you can create authorization plugins and add
|
||||
them to your Docker daemon configuration. Using an authorization plugin, a
|
||||
Docker administrator can configure granular access policies for managing access
|
||||
|
@ -69,7 +69,7 @@ can be ordered. Each request to the daemon passes in order through the chain.
|
|||
Only when all the plugins grant access to the resource, is the access granted.
|
||||
|
||||
When an HTTP request is made to the Docker daemon through the CLI or via the
|
||||
remote API, the authentication subsystem passes the request to the installed
|
||||
Engine API, the authentication subsystem passes the request to the installed
|
||||
authentication plugin(s). The request contains the user (caller) and command
|
||||
context. The plugin is responsible for deciding whether to allow or deny the
|
||||
request.
|
||||
|
|
|
@ -24,7 +24,7 @@ A self-sufficient runtime for containers.
|
|||
Options:
|
||||
|
||||
--add-runtime value Register an additional OCI compatible runtime (default [])
|
||||
--api-cors-header string Set CORS headers in the remote API
|
||||
--api-cors-header string Set CORS headers in the Engine API
|
||||
--authorization-plugin value Authorization plugins to load (default [])
|
||||
--bip string Specify network bridge IP
|
||||
-b, --bridge string Attach containers to a network bridge
|
||||
|
@ -101,7 +101,7 @@ To run the daemon with debug output, use `dockerd -D`.
|
|||
|
||||
## Daemon socket option
|
||||
|
||||
The Docker daemon can listen for [Docker Remote API](../api/docker_remote_api.md)
|
||||
The Docker daemon can listen for [Docker Engine API](../api/)
|
||||
requests via three different types of Socket: `unix`, `tcp`, and `fd`.
|
||||
|
||||
By default, a `unix` domain socket (or IPC socket) is created at
|
||||
|
@ -905,7 +905,7 @@ path. Consult with your Docker administrator to get information about the
|
|||
plugins available to you.
|
||||
|
||||
Once a plugin is installed, requests made to the `daemon` through the command
|
||||
line or Docker's remote API are allowed or denied by the plugin. If you have
|
||||
line or Docker's Engine API are allowed or denied by the plugin. If you have
|
||||
multiple plugins installed, at least one must allow the request for it to
|
||||
complete.
|
||||
|
||||
|
@ -1094,11 +1094,11 @@ the `--cgroup-parent` option on the daemon.
|
|||
## Daemon Metrics
|
||||
|
||||
The `--metrics-addr` option takes a tcp address to serve the metrics API.
|
||||
This feature is still experimental, therefore, the daemon must be running in experimental
|
||||
This feature is still experimental, therefore, the daemon must be running in experimental
|
||||
mode for this feature to work.
|
||||
|
||||
To serve the metrics API on localhost:1337 you would specify `--metrics-addr 127.0.0.1:1337`
|
||||
allowing you to make requests on the API at `127.0.0.1:1337/metrics` to receive metrics in the
|
||||
allowing you to make requests on the API at `127.0.0.1:1337/metrics` to receive metrics in the
|
||||
[prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/) format.
|
||||
|
||||
If you are running a prometheus server you can add this address to your scrape configs
|
||||
|
@ -1113,7 +1113,7 @@ scrape_configs:
|
|||
```
|
||||
|
||||
Please note that this feature is still marked as experimental as metrics and metric
|
||||
names could change while this feature is still in experimental. Please provide
|
||||
names could change while this feature is still in experimental. Please provide
|
||||
feedback on what you would like to see collected in the API.
|
||||
|
||||
## Daemon configuration file
|
||||
|
|
|
@ -303,7 +303,7 @@ func (s *DockerSuite) TestAPIStatsNoStreamConnectedContainers(c *check.C) {
|
|||
|
||||
select {
|
||||
case err := <-ch:
|
||||
c.Assert(err, checker.IsNil, check.Commentf("Error in stats remote API: %v", err))
|
||||
c.Assert(err, checker.IsNil, check.Commentf("Error in stats Engine API: %v", err))
|
||||
case <-time.After(15 * time.Second):
|
||||
c.Fatalf("Stats did not return after timeout")
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ following format.
|
|||
Set additional OCI compatible runtime.
|
||||
|
||||
**--api-cors-header**=""
|
||||
Set CORS headers in the remote API. Default is cors disabled. Give urls like
|
||||
Set CORS headers in the Engine API. Default is cors disabled. Give urls like
|
||||
"http://foo, http://bar, ...". Give "*" to allow all.
|
||||
|
||||
**--authorization-plugin**=""
|
||||
|
@ -664,7 +664,7 @@ specify a name or path. Consult with your Docker administrator to get
|
|||
information about the plugins available to you.
|
||||
|
||||
Once a plugin is installed, requests made to the `daemon` through the command
|
||||
line or Docker's remote API are allowed or denied by the plugin. If you have
|
||||
line or Docker's Engine API are allowed or denied by the plugin. If you have
|
||||
multiple plugins installed, at least one must allow the request for it to
|
||||
complete.
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ const maxBodySize = 1048576 // 1MB
|
|||
// Authenticate Request:
|
||||
// Call authZ plugins with current REST request and AuthN response
|
||||
// Request contains full HTTP packet sent to the docker daemon
|
||||
// https://docs.docker.com/engine/reference/api/docker_remote_api/
|
||||
// https://docs.docker.com/engine/reference/api/
|
||||
//
|
||||
// Authenticate Response:
|
||||
// Call authZ plugins with full info about current REST request, REST response and AuthN response
|
||||
|
|
|
@ -117,7 +117,7 @@ If releasing a major version (X or Y increased in vX.Y.Z), simply listing notabl
|
|||
```markdown
|
||||
#### Notable features since <last major version>
|
||||
* New docker command to do something useful
|
||||
* Remote API change (deprecating old version)
|
||||
* Engine API change (deprecating old version)
|
||||
* Performance improvements in some usecases
|
||||
* ...
|
||||
```
|
||||
|
@ -131,7 +131,7 @@ Each change should be listed under a category heading formatted as `#### CATEGOR
|
|||
* Documentation
|
||||
* Hack
|
||||
* Packaging
|
||||
* Remote API
|
||||
* Engine API
|
||||
* Runtime
|
||||
* Other (please use this category sparingly)
|
||||
|
||||
|
@ -154,7 +154,7 @@ EXAMPLES:
|
|||
|
||||
+ 'docker build -t FOO .' applies the tag FOO to the newly built image
|
||||
|
||||
#### Remote API
|
||||
#### Engine API
|
||||
|
||||
- Fix a bug in the optional unix socket transport
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ Possible transitions from this state:
|
|||
After merging a pull request, the maintainer should consider applying one or multiple impact labels
|
||||
to ease future classification:
|
||||
|
||||
* `impact/api` signifies the patch impacted the remote API
|
||||
* `impact/api` signifies the patch impacted the Engine API
|
||||
* `impact/changelog` signifies the change is significant enough to make it in the changelog
|
||||
* `impact/cli` signifies the patch impacted a CLI command
|
||||
* `impact/dockerfile` signifies the patch impacted the Dockerfile syntax
|
||||
|
|
Loading…
Reference in a new issue