mirror of
https://github.com/moby/moby.git
synced 2026-01-11 02:31:44 +00:00
update github links to moby/moby
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -14,8 +14,8 @@ FROM ${GOLANG_IMAGE}
|
|||||||
ENV GOTOOLCHAIN=local
|
ENV GOTOOLCHAIN=local
|
||||||
|
|
||||||
# Compile and runtime deps
|
# Compile and runtime deps
|
||||||
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
|
# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#build-dependencies
|
||||||
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
|
# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#runtime-dependencies
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
build-essential \
|
build-essential \
|
||||||
curl \
|
curl \
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
The Moby Project
|
The Moby Project
|
||||||
================
|
================
|
||||||
|
|
||||||
[](https://pkg.go.dev/github.com/docker/docker)
|
[](https://pkg.go.dev/github.com/moby/moby/v2)
|
||||||
[](https://goreportcard.com/report/github.com/docker/docker)
|
[](https://goreportcard.com/report/github.com/moby/moby/v2)
|
||||||
[](https://scorecard.dev/viewer/?uri=github.com/moby/moby)
|
[](https://scorecard.dev/viewer/?uri=github.com/moby/moby)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -113,5 +113,5 @@ We see gRPC as the natural communication layer between decoupled components.
|
|||||||
|
|
||||||
In addition to pushing out large components into other projects, much of the
|
In addition to pushing out large components into other projects, much of the
|
||||||
internal code structure, and in particular the
|
internal code structure, and in particular the
|
||||||
["Daemon"](https://godoc.org/github.com/docker/docker/daemon#Daemon) object,
|
["Daemon"](https://pkg.go.dev/github.com/moby/moby/v2/daemon#Daemon) object,
|
||||||
should be split into smaller, more manageable, and more testable components.
|
should be split into smaller, more manageable, and more testable components.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ The Engine API is an HTTP API used by the command-line client to communicate wit
|
|||||||
It consists of various components in this repository:
|
It consists of various components in this repository:
|
||||||
|
|
||||||
- `api/swagger.yaml` A Swagger definition of the API.
|
- `api/swagger.yaml` A Swagger definition of the API.
|
||||||
- `api/types/` Types shared by both the client and server, representing various objects, options, responses, etc. Most are written manually, but some are automatically generated from the Swagger definition. See [#27919](https://github.com/docker/docker/issues/27919) for progress on this.
|
- `api/types/` Types shared by both the client and server, representing various objects, options, responses, etc. Most are written manually, but some are automatically generated from the Swagger definition. See [#27919](https://github.com/moby/moby/issues/27919) for progress on this.
|
||||||
- `client/` The Go client used by the command-line client. It can also be used by third-party Go programs.
|
- `client/` The Go client used by the command-line client. It can also be used by third-party Go programs.
|
||||||
- `daemon/` The daemon, which serves the API.
|
- `daemon/` The daemon, which serves the API.
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ The file is split into two main sections:
|
|||||||
|
|
||||||
To make an edit, first look for the endpoint you want to edit under `paths`, then make the required edits. Endpoints may reference reusable objects with `$ref`, which can be found in the `definitions` section.
|
To make an edit, first look for the endpoint you want to edit under `paths`, then make the required edits. Endpoints may reference reusable objects with `$ref`, which can be found in the `definitions` section.
|
||||||
|
|
||||||
There is hopefully enough example material in the file for you to copy a similar pattern from elsewhere in the file (e.g. adding new fields or endpoints), but for the full reference, see the [Swagger specification](https://github.com/docker/docker/issues/27919).
|
There is hopefully enough example material in the file for you to copy a similar pattern from elsewhere in the file (e.g. adding new fields or endpoints), but for the full reference, see the [Swagger specification](https://github.com/moby/moby/issues/27919).
|
||||||
|
|
||||||
`swagger.yaml` is validated by `hack/validate/swagger` to ensure it is a valid Swagger definition. This is useful when making edits to ensure you are doing the right thing.
|
`swagger.yaml` is validated by `hack/validate/swagger` to ensure it is a valid Swagger definition. This is useful when making edits to ensure you are doing the right thing.
|
||||||
|
|
||||||
@@ -39,4 +39,4 @@ When you make edits to `swagger.yaml`, you may want to check the generated API d
|
|||||||
|
|
||||||
Run `make swagger-docs` and a preview will be running at `http://localhost:9000`. Some of the styling may be incorrect, but you'll be able to ensure that it is generating the correct documentation.
|
Run `make swagger-docs` and a preview will be running at `http://localhost:9000`. Some of the styling may be incorrect, but you'll be able to ensure that it is generating the correct documentation.
|
||||||
|
|
||||||
The production documentation is generated by vendoring `swagger.yaml` into [docker/docker.github.io](https://github.com/docker/docker.github.io).
|
The production documentation is generated by vendoring `swagger.yaml` into [docker/docs](https://github.com/docker/docs).
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ func main() {
|
|||||||
|
|
||||||
// Ignore SIGPIPE events. These are generated by systemd when journald is restarted while
|
// Ignore SIGPIPE events. These are generated by systemd when journald is restarted while
|
||||||
// the docker daemon is not restarted and also running under systemd.
|
// the docker daemon is not restarted and also running under systemd.
|
||||||
// Fixes https://github.com/docker/docker/issues/19728
|
// Fixes https://github.com/moby/moby/issues/19728
|
||||||
signal.Ignore(syscall.SIGPIPE)
|
signal.Ignore(syscall.SIGPIPE)
|
||||||
|
|
||||||
// Set terminal emulation based on platform as required.
|
// Set terminal emulation based on platform as required.
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ start() {
|
|||||||
pid=$!
|
pid=$!
|
||||||
touch $lockfile
|
touch $lockfile
|
||||||
# wait up to 10 seconds for the pidfile to exist. see
|
# wait up to 10 seconds for the pidfile to exist. see
|
||||||
# https://github.com/docker/docker/issues/5359
|
# https://github.com/moby/moby/issues/5359
|
||||||
tries=0
|
tries=0
|
||||||
while [ ! -f $pidfile -a $tries -lt 10 ]; do
|
while [ ! -f $pidfile -a $tries -lt 10 ]; do
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|||||||
@@ -218,10 +218,10 @@ with matching paths, and orders the list of file sums accordingly [3].
|
|||||||
|
|
||||||
## Footnotes
|
## Footnotes
|
||||||
|
|
||||||
* [0] Versioning https://github.com/docker/docker/commit/747f89cd327db9d50251b17797c4d825162226d0
|
* [0] Versioning https://github.com/moby/moby/commit/747f89cd327db9d50251b17797c4d825162226d0
|
||||||
* [1] Alternate ciphers https://github.com/docker/docker/commit/4e9925d780665149b8bc940d5ba242ada1973c4e
|
* [1] Alternate ciphers https://github.com/moby/moby/commit/4e9925d780665149b8bc940d5ba242ada1973c4e
|
||||||
* [2] Tar http://en.wikipedia.org/wiki/Tar_%28computing%29
|
* [2] Tar http://en.wikipedia.org/wiki/Tar_%28computing%29
|
||||||
* [3] Name collision https://github.com/docker/docker/commit/c5e6362c53cbbc09ddbabd5a7323e04438b57d31
|
* [3] Name collision https://github.com/moby/moby/commit/c5e6362c53cbbc09ddbabd5a7323e04438b57d31
|
||||||
|
|
||||||
## Acknowledgments
|
## Acknowledgments
|
||||||
|
|
||||||
|
|||||||
@@ -525,7 +525,7 @@ func getConflictFreeConfiguration(configFile string, flags *pflag.FlagSet) (*Con
|
|||||||
|
|
||||||
// Override flag values to make sure the values set in the config file with nullable values, like `false`,
|
// Override flag values to make sure the values set in the config file with nullable values, like `false`,
|
||||||
// are not overridden by default truthy values from the flags that were not explicitly set.
|
// are not overridden by default truthy values from the flags that were not explicitly set.
|
||||||
// See https://github.com/docker/docker/issues/20289 for an example.
|
// See https://github.com/moby/moby/issues/20289 for an example.
|
||||||
//
|
//
|
||||||
// TODO: Rewrite configuration logic to avoid same issue with other nullable values, like numbers.
|
// TODO: Rewrite configuration logic to avoid same issue with other nullable values, like numbers.
|
||||||
namedOptions := make(map[string]interface{})
|
namedOptions := make(map[string]interface{})
|
||||||
|
|||||||
@@ -607,7 +607,7 @@ func (container *Container) StopTimeout() int {
|
|||||||
// The non-recommended host configuration in the start api can
|
// The non-recommended host configuration in the start api can
|
||||||
// make these fields nil again, this corrects that issue until
|
// make these fields nil again, this corrects that issue until
|
||||||
// we remove that behavior for good.
|
// we remove that behavior for good.
|
||||||
// See https://github.com/docker/docker/pull/17779
|
// See https://github.com/moby/moby/pull/17779
|
||||||
// for a more detailed explanation on why we don't want that.
|
// for a more detailed explanation on why we don't want that.
|
||||||
func (container *Container) InitDNSHostConfig() {
|
func (container *Container) InitDNSHostConfig() {
|
||||||
container.Lock()
|
container.Lock()
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
//
|
//
|
||||||
// https://github.com/docker/docker/issues/8069
|
// https://github.com/moby/moby/issues/8069
|
||||||
//
|
//
|
||||||
|
|
||||||
func TestGetContainer(t *testing.T) {
|
func TestGetContainer(t *testing.T) {
|
||||||
|
|||||||
@@ -808,7 +808,7 @@ func writeLayer(layerData io.Reader, home string, id string, parentLayerPaths ..
|
|||||||
defer func() {
|
defer func() {
|
||||||
if err := winio.DisableProcessPrivileges([]string{winio.SeSecurityPrivilege, winio.SeBackupPrivilege, winio.SeRestorePrivilege}); err != nil {
|
if err := winio.DisableProcessPrivileges([]string{winio.SeSecurityPrivilege, winio.SeBackupPrivilege, winio.SeRestorePrivilege}); err != nil {
|
||||||
// This should never happen, but just in case when in debugging mode.
|
// This should never happen, but just in case when in debugging mode.
|
||||||
// See https://github.com/docker/docker/pull/28002#discussion_r86259241 for rationale.
|
// See https://github.com/moby/moby/pull/28002#discussion_r86259241 for rationale.
|
||||||
panic("Failed to disabled process privileges while in non re-exec mode")
|
panic("Failed to disabled process privileges while in non re-exec mode")
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|||||||
@@ -544,7 +544,7 @@ func (p *puller) pullSchema2Layers(ctx context.Context, target distribution.Desc
|
|||||||
layerStoreOS = platform.OS
|
layerStoreOS = platform.OS
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/docker/docker/issues/24766 - Err on the side of caution,
|
// https://github.com/moby/moby/issues/24766 - Err on the side of caution,
|
||||||
// explicitly blocking images intended for linux from the Windows daemon. On
|
// explicitly blocking images intended for linux from the Windows daemon. On
|
||||||
// Windows, we do this before the attempt to download, effectively serialising
|
// Windows, we do this before the attempt to download, effectively serialising
|
||||||
// the download slightly slowing it down. We have to do it this way, as
|
// the download slightly slowing it down. We have to do it this way, as
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ var (
|
|||||||
schema2.MediaTypeImageConfig,
|
schema2.MediaTypeImageConfig,
|
||||||
ocispec.MediaTypeImageConfig,
|
ocispec.MediaTypeImageConfig,
|
||||||
// Handle unexpected values from https://github.com/docker/distribution/issues/1621
|
// Handle unexpected values from https://github.com/docker/distribution/issues/1621
|
||||||
// (see also https://github.com/docker/docker/issues/22378,
|
// (see also https://github.com/moby/moby/issues/22378,
|
||||||
// https://github.com/docker/docker/issues/30083)
|
// https://github.com/moby/moby/issues/30083)
|
||||||
"application/octet-stream",
|
"application/octet-stream",
|
||||||
"application/json",
|
"application/json",
|
||||||
"text/html",
|
"text/html",
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
# libnetwork - networking for containers
|
|
||||||
|
|
||||||
Libnetwork provides a native Go implementation for connecting containers
|
|
||||||
|
|
||||||
The goal of libnetwork is to deliver a robust Container Network Model that provides a consistent programming interface and the required network abstractions for applications.
|
|
||||||
|
|
||||||
#### Design
|
|
||||||
Please refer to the [design](docs/design.md) for more information.
|
|
||||||
|
|
||||||
#### Using libnetwork
|
|
||||||
|
|
||||||
There are many networking solutions available to suit a broad range of use-cases. libnetwork uses a driver / plugin model to support all of these solutions while abstracting the complexity of the driver implementations by exposing a simple and consistent Network Model to users.
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
Want to hack on libnetwork? [Docker's contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md) apply.
|
|
||||||
|
|
||||||
## Copyright and license
|
|
||||||
Code and documentation copyright 2015 Docker, inc. Code released under the Apache 2.0 license. Docs released under Creative commons.
|
|
||||||
@@ -168,7 +168,7 @@ func (daemon *Daemon) clusterNetworksPrune(ctx context.Context, pruneFilters fil
|
|||||||
if !matchLabels(pruneFilters, nw.Labels) {
|
if !matchLabels(pruneFilters, nw.Labels) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// https://github.com/docker/docker/issues/24186
|
// https://github.com/moby/moby/issues/24186
|
||||||
// `docker network inspect` unfortunately displays ONLY those containers that are local to that node.
|
// `docker network inspect` unfortunately displays ONLY those containers that are local to that node.
|
||||||
// So we try to remove it anyway and check the error
|
// So we try to remove it anyway and check the error
|
||||||
err = cluster.RemoveNetwork(nw.ID)
|
err = cluster.RemoveNetwork(nw.ID)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import (
|
|||||||
|
|
||||||
// NOTE: \\s does not detect unicode whitespaces.
|
// NOTE: \\s does not detect unicode whitespaces.
|
||||||
// So we use fieldsASCII instead of strings.Fields in parsePSOutput.
|
// So we use fieldsASCII instead of strings.Fields in parsePSOutput.
|
||||||
// See https://github.com/docker/docker/pull/24358
|
// See https://github.com/moby/moby/pull/24358
|
||||||
var psArgsRegexp = lazyregexp.New("\\s+([^\\s]*)=\\s*(PID[^\\s]*)")
|
var psArgsRegexp = lazyregexp.New("\\s+([^\\s]*)=\\s*(PID[^\\s]*)")
|
||||||
|
|
||||||
func validatePSArgs(psArgs string) error {
|
func validatePSArgs(psArgs string) error {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package daemon
|
package daemon
|
||||||
|
|
||||||
// ContainerCreateWorkdir creates the working directory. This solves the
|
// ContainerCreateWorkdir creates the working directory. This solves the
|
||||||
// issue arising from https://github.com/docker/docker/issues/27545,
|
// issue arising from https://github.com/moby/moby/issues/27545,
|
||||||
// which was initially fixed by https://github.com/docker/docker/pull/27884. But that fix
|
// which was initially fixed by https://github.com/moby/moby/pull/27884. But that fix
|
||||||
// was too expensive in terms of performance on Windows. Instead,
|
// was too expensive in terms of performance on Windows. Instead,
|
||||||
// https://github.com/docker/docker/pull/28514 introduces this new functionality
|
// https://github.com/moby/moby/pull/28514 introduces this new functionality
|
||||||
// where the builder calls into the backend here to create the working directory.
|
// where the builder calls into the backend here to create the working directory.
|
||||||
func (daemon *Daemon) ContainerCreateWorkdir(cID string) error {
|
func (daemon *Daemon) ContainerCreateWorkdir(cID string) error {
|
||||||
container, err := daemon.GetContainer(cID)
|
container, err := daemon.GetContainer(cID)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ set -e
|
|||||||
#
|
#
|
||||||
# Requirements:
|
# Requirements:
|
||||||
# - The current directory should be a checkout of the docker source code
|
# - The current directory should be a checkout of the docker source code
|
||||||
# (https://github.com/docker/docker). Whatever version is checked out
|
# (https://github.com/moby/moby). Whatever version is checked out
|
||||||
# will be built.
|
# will be built.
|
||||||
# - The VERSION file, at the root of the repository, should exist, and
|
# - The VERSION file, at the root of the repository, should exist, and
|
||||||
# will be used as Docker binary version and package version.
|
# will be used as Docker binary version and package version.
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ if ! command -v "$TEST_CLIENT_BINARY" &> /dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# This is a temporary hack for split-binary mode. It can be removed once
|
# This is a temporary hack for split-binary mode. It can be removed once
|
||||||
# https://github.com/docker/docker/pull/22134 is merged into docker master
|
# https://github.com/moby/moby/pull/22134 is merged into docker master
|
||||||
if [ "$(go env GOOS)" = 'windows' ]; then
|
if [ "$(go env GOOS)" = 'windows' ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ else
|
|||||||
echo
|
echo
|
||||||
echo 'Please amend each commit to include a properly formatted DCO marker.'
|
echo 'Please amend each commit to include a properly formatted DCO marker.'
|
||||||
echo
|
echo
|
||||||
echo 'Visit the following URL for information about the Docker DCO:'
|
echo 'Visit the following URL for information about the DCO:'
|
||||||
echo ' https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work'
|
echo ' https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work'
|
||||||
echo
|
echo
|
||||||
} >&2
|
} >&2
|
||||||
false
|
false
|
||||||
|
|||||||
@@ -1045,7 +1045,7 @@ func (s *DockerAPISuite) TestContainerAPIDeleteRemoveVolume(c *testing.T) {
|
|||||||
assert.Assert(c, os.IsNotExist(err), "expected to get ErrNotExist error, got %v", err)
|
assert.Assert(c, os.IsNotExist(err), "expected to get ErrNotExist error, got %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Regression test for https://github.com/docker/docker/issues/6231
|
// Regression test for https://github.com/moby/moby/issues/6231
|
||||||
func (s *DockerAPISuite) TestContainerAPIChunkedEncoding(c *testing.T) {
|
func (s *DockerAPISuite) TestContainerAPIChunkedEncoding(c *testing.T) {
|
||||||
config := map[string]interface{}{
|
config := map[string]interface{}{
|
||||||
"Image": "busybox",
|
"Image": "busybox",
|
||||||
|
|||||||
@@ -447,7 +447,7 @@ ADD %s/file /`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Regression for https://github.com/docker/docker/pull/27805
|
// Regression for https://github.com/moby/moby/pull/27805
|
||||||
// Makes sure that we don't use the cache if the contents of
|
// Makes sure that we don't use the cache if the contents of
|
||||||
// a file in a subfolder of the context is modified and we re-build.
|
// a file in a subfolder of the context is modified and we re-build.
|
||||||
func (s *DockerCLIBuildSuite) TestBuildModifyFileInFolder(c *testing.T) {
|
func (s *DockerCLIBuildSuite) TestBuildModifyFileInFolder(c *testing.T) {
|
||||||
@@ -5972,7 +5972,7 @@ func (s *DockerCLIBuildSuite) TestBuildIntermediateTarget(c *testing.T) {
|
|||||||
|
|
||||||
// TestBuildOpaqueDirectory tests that a build succeeds which
|
// TestBuildOpaqueDirectory tests that a build succeeds which
|
||||||
// creates opaque directories.
|
// creates opaque directories.
|
||||||
// See https://github.com/docker/docker/issues/25244
|
// See https://github.com/moby/moby/issues/25244
|
||||||
func (s *DockerCLIBuildSuite) TestBuildOpaqueDirectory(c *testing.T) {
|
func (s *DockerCLIBuildSuite) TestBuildOpaqueDirectory(c *testing.T) {
|
||||||
testRequires(c, DaemonIsLinux)
|
testRequires(c, DaemonIsLinux)
|
||||||
dockerFile := `
|
dockerFile := `
|
||||||
|
|||||||
@@ -675,7 +675,7 @@ func (s *DockerDaemonSuite) TestHTTPSInfo(c *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TestHTTPSRun connects via two-way authenticated HTTPS to the create, attach, start, and wait endpoints.
|
// TestHTTPSRun connects via two-way authenticated HTTPS to the create, attach, start, and wait endpoints.
|
||||||
// https://github.com/docker/docker/issues/19280
|
// https://github.com/moby/moby/issues/19280
|
||||||
func (s *DockerDaemonSuite) TestHTTPSRun(c *testing.T) {
|
func (s *DockerDaemonSuite) TestHTTPSRun(c *testing.T) {
|
||||||
const (
|
const (
|
||||||
testDaemonHTTPSAddr = "tcp://localhost:4271"
|
testDaemonHTTPSAddr = "tcp://localhost:4271"
|
||||||
@@ -1834,8 +1834,8 @@ func (s *DockerDaemonSuite) TestDaemonRestartSaveContainerExitCode(c *testing.T)
|
|||||||
// process itself is PID1, the container does not fail on _startup_ (i.e., `docker-init` starting),
|
// process itself is PID1, the container does not fail on _startup_ (i.e., `docker-init` starting),
|
||||||
// but directly after. The exit code of the container is still 127, but the Error Message is not
|
// but directly after. The exit code of the container is still 127, but the Error Message is not
|
||||||
// captured, so `.State.Error` is empty.
|
// captured, so `.State.Error` is empty.
|
||||||
// See the discussion on https://github.com/docker/docker/pull/30227#issuecomment-274161426,
|
// See the discussion on https://github.com/moby/moby/pull/30227#issuecomment-274161426,
|
||||||
// and https://github.com/docker/docker/pull/26061#r78054578 for more information.
|
// and https://github.com/moby/moby/pull/26061#r78054578 for more information.
|
||||||
_, err := s.d.Cmd("run", "--name", containerName, "--init=false", "busybox", "toto")
|
_, err := s.d.Cmd("run", "--name", containerName, "--init=false", "busybox", "toto")
|
||||||
assert.ErrorContains(c, err, "")
|
assert.ErrorContains(c, err, "")
|
||||||
|
|
||||||
|
|||||||
@@ -522,7 +522,7 @@ func (s *DockerCLIExecSuite) TestExecStartFails(c *testing.T) {
|
|||||||
assert.Assert(c, is.Contains(out, expectedMsg))
|
assert.Assert(c, is.Contains(out, expectedMsg))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fix regression in https://github.com/docker/docker/pull/26461#issuecomment-250287297
|
// Fix regression in https://github.com/moby/moby/pull/26461#issuecomment-250287297
|
||||||
func (s *DockerCLIExecSuite) TestExecWindowsPathNotWiped(c *testing.T) {
|
func (s *DockerCLIExecSuite) TestExecWindowsPathNotWiped(c *testing.T) {
|
||||||
testRequires(c, DaemonIsWindows)
|
testRequires(c, DaemonIsWindows)
|
||||||
out := cli.DockerCmd(c, "run", "-d", "--name", "testing", minimalBaseImage(), "powershell", "start-sleep", "60").Stdout()
|
out := cli.DockerCmd(c, "run", "-d", "--name", "testing", minimalBaseImage(), "powershell", "start-sleep", "60").Stdout()
|
||||||
|
|||||||
@@ -1760,7 +1760,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkDisconnectFromBridge(c *testing.T)
|
|||||||
assert.NilError(c, err)
|
assert.NilError(c, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestConntrackFlowsLeak covers the failure scenario of ticket: https://github.com/docker/docker/issues/8795
|
// TestConntrackFlowsLeak covers the failure scenario of ticket: https://github.com/moby/moby/issues/8795
|
||||||
// Validates that conntrack is correctly cleaned once a container is destroyed
|
// Validates that conntrack is correctly cleaned once a container is destroyed
|
||||||
func (s *DockerNetworkSuite) TestConntrackFlowsLeak(c *testing.T) {
|
func (s *DockerNetworkSuite) TestConntrackFlowsLeak(c *testing.T) {
|
||||||
testRequires(c, IsAmd64, DaemonIsLinux, Network, testEnv.IsLocalDaemon)
|
testRequires(c, IsAmd64, DaemonIsLinux, Network, testEnv.IsLocalDaemon)
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ func (ps *DockerPluginSuite) TestPluginInspect(c *testing.T) {
|
|||||||
assert.ErrorContains(c, err, "")
|
assert.ErrorContains(c, err, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test case for https://github.com/docker/docker/pull/29186#discussion_r91277345
|
// Test case for https://github.com/moby/moby/pull/29186#discussion_r91277345
|
||||||
func (s *DockerCLIPluginsSuite) TestPluginInspectOnWindows(c *testing.T) {
|
func (s *DockerCLIPluginsSuite) TestPluginInspectOnWindows(c *testing.T) {
|
||||||
// This test should work on Windows only
|
// This test should work on Windows only
|
||||||
testRequires(c, DaemonIsWindows)
|
testRequires(c, DaemonIsWindows)
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ func (s *DockerHubPullSuite) TestPullClientDisconnect(c *testing.T) {
|
|||||||
assert.ErrorContains(c, err, "", "image was pulled after client disconnected")
|
assert.ErrorContains(c, err, "", "image was pulled after client disconnected")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Regression test for https://github.com/docker/docker/issues/26429
|
// Regression test for https://github.com/moby/moby/issues/26429
|
||||||
func (s *DockerCLIPullSuite) TestPullLinuxImageFailsOnWindows(c *testing.T) {
|
func (s *DockerCLIPullSuite) TestPullLinuxImageFailsOnWindows(c *testing.T) {
|
||||||
testRequires(c, DaemonIsWindows, Network)
|
testRequires(c, DaemonIsWindows, Network)
|
||||||
_, _, err := dockerCmdWithError("pull", "ubuntu")
|
_, _, err := dockerCmdWithError("pull", "ubuntu")
|
||||||
@@ -211,7 +211,7 @@ func (s *DockerCLIPullSuite) TestPullLinuxImageFailsOnWindows(c *testing.T) {
|
|||||||
assert.ErrorContains(c, err, "no matching manifest for windows")
|
assert.ErrorContains(c, err, "no matching manifest for windows")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Regression test for https://github.com/docker/docker/issues/28892
|
// Regression test for https://github.com/moby/moby/issues/28892
|
||||||
func (s *DockerCLIPullSuite) TestPullWindowsImageFailsOnLinux(c *testing.T) {
|
func (s *DockerCLIPullSuite) TestPullWindowsImageFailsOnLinux(c *testing.T) {
|
||||||
testRequires(c, DaemonIsLinux, Network)
|
testRequires(c, DaemonIsLinux, Network)
|
||||||
_, _, err := dockerCmdWithError("pull", "mcr.microsoft.com/windows/servercore:ltsc2022")
|
_, _, err := dockerCmdWithError("pull", "mcr.microsoft.com/windows/servercore:ltsc2022")
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ func (s *DockerCLIRmiSuite) TestRmiImgIDForce(c *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// See https://github.com/docker/docker/issues/14116
|
// See https://github.com/moby/moby/issues/14116
|
||||||
func (s *DockerCLIRmiSuite) TestRmiImageIDForceWithRunningContainersAndMultipleTags(c *testing.T) {
|
func (s *DockerCLIRmiSuite) TestRmiImageIDForceWithRunningContainersAndMultipleTags(c *testing.T) {
|
||||||
dockerfile := "FROM busybox\nRUN echo test 14116\n"
|
dockerfile := "FROM busybox\nRUN echo test 14116\n"
|
||||||
buildImageSuccessfully(c, "test-14116", build.WithDockerfile(dockerfile))
|
buildImageSuccessfully(c, "test-14116", build.WithDockerfile(dockerfile))
|
||||||
|
|||||||
@@ -546,7 +546,7 @@ func (s *DockerCLIRunSuite) TestRunNoDupVolumes(c *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test for https://github.com/docker/docker/issues/22093
|
// Test for https://github.com/moby/moby/issues/22093
|
||||||
volumename1 := "test1"
|
volumename1 := "test1"
|
||||||
volumename2 := "test2"
|
volumename2 := "test2"
|
||||||
volume1 := volumename1 + someplace
|
volume1 := volumename1 + someplace
|
||||||
@@ -1956,7 +1956,7 @@ func (s *DockerCLIRunSuite) TestRunPortInUse(c *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/docker/docker/issues/12148
|
// https://github.com/moby/moby/issues/12148
|
||||||
func (s *DockerCLIRunSuite) TestRunAllocatePortInReservedRange(c *testing.T) {
|
func (s *DockerCLIRunSuite) TestRunAllocatePortInReservedRange(c *testing.T) {
|
||||||
// TODO Windows. -P is not yet supported
|
// TODO Windows. -P is not yet supported
|
||||||
testRequires(c, DaemonIsLinux)
|
testRequires(c, DaemonIsLinux)
|
||||||
@@ -2021,7 +2021,7 @@ func (s *DockerCLIRunSuite) TestRunMountOrdering(c *testing.T) {
|
|||||||
"ls "+prefix+"/tmp/touch-me && ls "+prefix+"/tmp/foo/touch-me && ls "+prefix+"/tmp/tmp2/touch-me && ls "+prefix+"/tmp/tmp2/foo/touch-me")
|
"ls "+prefix+"/tmp/touch-me && ls "+prefix+"/tmp/foo/touch-me && ls "+prefix+"/tmp/tmp2/touch-me && ls "+prefix+"/tmp/tmp2/foo/touch-me")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Regression test for https://github.com/docker/docker/issues/8259
|
// Regression test for https://github.com/moby/moby/issues/8259
|
||||||
func (s *DockerCLIRunSuite) TestRunReuseBindVolumeThatIsSymlink(c *testing.T) {
|
func (s *DockerCLIRunSuite) TestRunReuseBindVolumeThatIsSymlink(c *testing.T) {
|
||||||
// Not applicable on Windows as Windows does not support volumes
|
// Not applicable on Windows as Windows does not support volumes
|
||||||
testRequires(c, testEnv.IsLocalDaemon, DaemonIsLinux, NotUserNamespace)
|
testRequires(c, testEnv.IsLocalDaemon, DaemonIsLinux, NotUserNamespace)
|
||||||
@@ -2885,7 +2885,7 @@ func (s *DockerCLIRunSuite) TestRunCapAddCHOWN(c *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/docker/docker/pull/14498
|
// https://github.com/moby/moby/pull/14498
|
||||||
func (s *DockerCLIRunSuite) TestVolumeFromMixedRWOptions(c *testing.T) {
|
func (s *DockerCLIRunSuite) TestVolumeFromMixedRWOptions(c *testing.T) {
|
||||||
prefix, slash := getPrefixAndSlashFromDaemonPlatform()
|
prefix, slash := getPrefixAndSlashFromDaemonPlatform()
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ func (s *DockerCLIStartSuite) OnTimeout(t *testing.T) {
|
|||||||
s.ds.OnTimeout(t)
|
s.ds.OnTimeout(t)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Regression test for https://github.com/docker/docker/issues/7843
|
// Regression test for https://github.com/moby/moby/issues/7843
|
||||||
func (s *DockerCLIStartSuite) TestStartAttachReturnsOnError(c *testing.T) {
|
func (s *DockerCLIStartSuite) TestStartAttachReturnsOnError(c *testing.T) {
|
||||||
// Windows does not support link
|
// Windows does not support link
|
||||||
testRequires(c, DaemonIsLinux)
|
testRequires(c, DaemonIsLinux)
|
||||||
|
|||||||
@@ -571,7 +571,7 @@ func (s *DockerSwarmSuite) TestSwarmCreateServiceWithNoIngressNetwork(c *testing
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Test case for #24108, also the case from:
|
// Test case for #24108, also the case from:
|
||||||
// https://github.com/docker/docker/pull/24620#issuecomment-233715656
|
// https://github.com/moby/moby/pull/24620#issuecomment-233715656
|
||||||
func (s *DockerSwarmSuite) TestSwarmTaskListFilter(c *testing.T) {
|
func (s *DockerSwarmSuite) TestSwarmTaskListFilter(c *testing.T) {
|
||||||
ctx := testutil.GetContext(c)
|
ctx := testutil.GetContext(c)
|
||||||
d := s.AddDaemon(ctx, c, true, true)
|
d := s.AddDaemon(ctx, c, true, true)
|
||||||
@@ -1599,7 +1599,7 @@ func (s *DockerSwarmSuite) TestSwarmNetworkCreateIssue27866(c *testing.T) {
|
|||||||
assert.NilError(c, err, "out: %v", out)
|
assert.NilError(c, err, "out: %v", out)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test case for https://github.com/docker/docker/pull/27938#issuecomment-265768303
|
// Test case for https://github.com/moby/moby/pull/27938#issuecomment-265768303
|
||||||
// This test creates two networks with the same name sequentially, with various drivers.
|
// This test creates two networks with the same name sequentially, with various drivers.
|
||||||
// Since the operations in this test are done sequentially, the 2nd call should fail with
|
// Since the operations in this test are done sequentially, the 2nd call should fail with
|
||||||
// "network with name FOO already exists".
|
// "network with name FOO already exists".
|
||||||
|
|||||||
@@ -409,7 +409,7 @@ func (s *DockerCLIVolumeSuite) TestVolumeCLIRmForce(c *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TestVolumeCLIRmForceInUse verifies that repeated `docker volume rm -f` calls does not remove a volume
|
// TestVolumeCLIRmForceInUse verifies that repeated `docker volume rm -f` calls does not remove a volume
|
||||||
// if it is in use. Test case for https://github.com/docker/docker/issues/31446
|
// if it is in use. Test case for https://github.com/moby/moby/issues/31446
|
||||||
func (s *DockerCLIVolumeSuite) TestVolumeCLIRmForceInUse(c *testing.T) {
|
func (s *DockerCLIVolumeSuite) TestVolumeCLIRmForceInUse(c *testing.T) {
|
||||||
const name = "testvolume"
|
const name = "testvolume"
|
||||||
id := cli.DockerCmd(c, "volume", "create", name).Stdout()
|
id := cli.DockerCmd(c, "volume", "create", name).Stdout()
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
|
|
||||||
// EmptyFS builds an image with an empty rootfs.
|
// EmptyFS builds an image with an empty rootfs.
|
||||||
// Layout: Legacy Docker Archive
|
// Layout: Legacy Docker Archive
|
||||||
// See https://github.com/docker/docker/pull/5262
|
// See https://github.com/moby/moby/pull/5262
|
||||||
// and also https://github.com/docker/docker/issues/4242
|
// and also https://github.com/moby/moby/issues/4242
|
||||||
func EmptyFS(dir string) (*ocispec.Index, error) {
|
func EmptyFS(dir string) (*ocispec.Index, error) {
|
||||||
if err := os.WriteFile(filepath.Join(dir, "manifest.json"), []byte(`[{"Config":"11f64303f0f7ffdc71f001788132bca5346831939a956e3e975c93267d89a16d.json","RepoTags":["emptyfs:latest"],"Layers":["511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/layer.tar"]}]`), 0o644); err != nil {
|
if err := os.WriteFile(filepath.Join(dir, "manifest.json"), []byte(`[{"Config":"11f64303f0f7ffdc71f001788132bca5346831939a956e3e975c93267d89a16d.json","RepoTags":["emptyfs:latest"],"Layers":["511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/layer.tar"]}]`), 0o644); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ func (m *Middleware) WrapHandler(handler func(ctx context.Context, w http.Respon
|
|||||||
// Default authorization using existing TLS connection credentials
|
// Default authorization using existing TLS connection credentials
|
||||||
// FIXME: Non trivial authorization mechanisms (such as advanced certificate validations, kerberos support
|
// FIXME: Non trivial authorization mechanisms (such as advanced certificate validations, kerberos support
|
||||||
// and ldap) will be extracted using AuthN feature, which is tracked under:
|
// and ldap) will be extracted using AuthN feature, which is tracked under:
|
||||||
// https://github.com/docker/docker/pull/20883
|
// https://github.com/moby/moby/pull/20883
|
||||||
if r.TLS != nil && len(r.TLS.PeerCertificates) > 0 {
|
if r.TLS != nil && len(r.TLS.PeerCertificates) > 0 {
|
||||||
user = r.TLS.PeerCertificates[0].Subject.CommonName
|
user = r.TLS.PeerCertificates[0].Subject.CommonName
|
||||||
userAuthNMethod = "TLS"
|
userAuthNMethod = "TLS"
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ etc.) allows to get early feedback on the design before getting into the
|
|||||||
implementation, which usually reduces the time needed to discuss a changeset.
|
implementation, which usually reduces the time needed to discuss a changeset.
|
||||||
- If the code is commented, fully tested and by extension follows every single
|
- If the code is commented, fully tested and by extension follows every single
|
||||||
rules defined by the [CONTRIBUTING guide](
|
rules defined by the [CONTRIBUTING guide](
|
||||||
https://github.com/docker/docker/blob/master/CONTRIBUTING.md), this will help
|
https://github.com/moby/moby/blob/master/CONTRIBUTING.md), this will help
|
||||||
the maintainers by speeding up the review.
|
the maintainers by speeding up the review.
|
||||||
|
|
||||||
## The release
|
## The release
|
||||||
|
|||||||
@@ -128,9 +128,9 @@ completeness, validity, and breadth of coverage across all existing and new docu
|
|||||||
They should ask for any editorial change that makes the documentation more consistent and easier to
|
They should ask for any editorial change that makes the documentation more consistent and easier to
|
||||||
understand.
|
understand.
|
||||||
|
|
||||||
The docker/docker repository only contains _reference documentation_, all
|
The moby/moby repository only contains _reference documentation_, all
|
||||||
"narrative" documentation is kept in a [unified documentation
|
"narrative" documentation is kept in a [unified documentation
|
||||||
repository](https://github.com/docker/docker.github.io). Reviewers must
|
repository](https://github.com/docker/docs). Reviewers must
|
||||||
therefore verify which parts of the documentation need to be updated. Any
|
therefore verify which parts of the documentation need to be updated. Any
|
||||||
contribution that may require changing the narrative should get the
|
contribution that may require changing the narrative should get the
|
||||||
`impact/documentation` label: this is the signal for documentation maintainers
|
`impact/documentation` label: this is the signal for documentation maintainers
|
||||||
|
|||||||
6
vendor/github.com/moby/moby/api/README.md
generated
vendored
6
vendor/github.com/moby/moby/api/README.md
generated
vendored
@@ -5,7 +5,7 @@ The Engine API is an HTTP API used by the command-line client to communicate wit
|
|||||||
It consists of various components in this repository:
|
It consists of various components in this repository:
|
||||||
|
|
||||||
- `api/swagger.yaml` A Swagger definition of the API.
|
- `api/swagger.yaml` A Swagger definition of the API.
|
||||||
- `api/types/` Types shared by both the client and server, representing various objects, options, responses, etc. Most are written manually, but some are automatically generated from the Swagger definition. See [#27919](https://github.com/docker/docker/issues/27919) for progress on this.
|
- `api/types/` Types shared by both the client and server, representing various objects, options, responses, etc. Most are written manually, but some are automatically generated from the Swagger definition. See [#27919](https://github.com/moby/moby/issues/27919) for progress on this.
|
||||||
- `client/` The Go client used by the command-line client. It can also be used by third-party Go programs.
|
- `client/` The Go client used by the command-line client. It can also be used by third-party Go programs.
|
||||||
- `daemon/` The daemon, which serves the API.
|
- `daemon/` The daemon, which serves the API.
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ The file is split into two main sections:
|
|||||||
|
|
||||||
To make an edit, first look for the endpoint you want to edit under `paths`, then make the required edits. Endpoints may reference reusable objects with `$ref`, which can be found in the `definitions` section.
|
To make an edit, first look for the endpoint you want to edit under `paths`, then make the required edits. Endpoints may reference reusable objects with `$ref`, which can be found in the `definitions` section.
|
||||||
|
|
||||||
There is hopefully enough example material in the file for you to copy a similar pattern from elsewhere in the file (e.g. adding new fields or endpoints), but for the full reference, see the [Swagger specification](https://github.com/docker/docker/issues/27919).
|
There is hopefully enough example material in the file for you to copy a similar pattern from elsewhere in the file (e.g. adding new fields or endpoints), but for the full reference, see the [Swagger specification](https://github.com/moby/moby/issues/27919).
|
||||||
|
|
||||||
`swagger.yaml` is validated by `hack/validate/swagger` to ensure it is a valid Swagger definition. This is useful when making edits to ensure you are doing the right thing.
|
`swagger.yaml` is validated by `hack/validate/swagger` to ensure it is a valid Swagger definition. This is useful when making edits to ensure you are doing the right thing.
|
||||||
|
|
||||||
@@ -39,4 +39,4 @@ When you make edits to `swagger.yaml`, you may want to check the generated API d
|
|||||||
|
|
||||||
Run `make swagger-docs` and a preview will be running at `http://localhost:9000`. Some of the styling may be incorrect, but you'll be able to ensure that it is generating the correct documentation.
|
Run `make swagger-docs` and a preview will be running at `http://localhost:9000`. Some of the styling may be incorrect, but you'll be able to ensure that it is generating the correct documentation.
|
||||||
|
|
||||||
The production documentation is generated by vendoring `swagger.yaml` into [docker/docker.github.io](https://github.com/docker/docker.github.io).
|
The production documentation is generated by vendoring `swagger.yaml` into [docker/docs](https://github.com/docker/docs).
|
||||||
|
|||||||
Reference in New Issue
Block a user