Compare commits
33 Commits
v1.7.0-rc3
...
v1.7.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 786b29d4db | |||
| 05cc946f62 | |||
| 0e9ef654d2 | |||
| 635ef94a6d | |||
| 937d37fa1a | |||
| 08c55cd94b | |||
| 10965f373c | |||
| c4e6b44df8 | |||
| cc712e6de4 | |||
| e698770d40 | |||
| ac6a9ce95f | |||
| b03b8a23d2 | |||
| 34815f3fa6 | |||
| 7e8cceb05a | |||
| 72d9ba5ac9 | |||
| fcc44248ef | |||
| c090014053 | |||
| 6906fb0693 | |||
| 50fe5319c4 | |||
| 53b80bdc9c | |||
| 44a8cf337b | |||
| 0baf609845 | |||
| e45e9e8fbc | |||
| 62fa0ac765 | |||
| 1b6403b9f1 | |||
| f0c8b90524 | |||
| 60ed011bed | |||
| f99e0cea8a | |||
| 984be835db | |||
| 9fc1c4efb9 | |||
| 012bf4129d | |||
| 0bd5953a88 | |||
| 197f2e0693 |
@@ -1,5 +1,63 @@
|
||||
# Changelog
|
||||
|
||||
## 1.7.1 (2015-07-14)
|
||||
|
||||
#### Runtime
|
||||
|
||||
- Fix default user spawning exec process with `docker exec`
|
||||
- Make `--bridge=none` not to configure the network bridge
|
||||
- Publish networking stats properly
|
||||
- Fix implicit devicemapper selection with static binaries
|
||||
- Fix socket connections that hung intermittently
|
||||
- Fix bridge interface creation on CentOS/RHEL 6.6
|
||||
- Fix local dns lookups added to resolv.conf
|
||||
- Fix copy command mounting volumes
|
||||
- Fix read/write privileges in volumes mounted with --volumes-from
|
||||
|
||||
#### Remote API
|
||||
|
||||
- Fix unmarshalling of Command and Entrypoint
|
||||
- Set limit for minimum client version supported
|
||||
- Validate port specification
|
||||
- Return proper errors when attach/reattach fail
|
||||
|
||||
#### Distribution
|
||||
|
||||
- Fix pulling private images
|
||||
- Fix fallback between registry V2 and V1
|
||||
|
||||
## 1.7.0 (2015-06-16)
|
||||
|
||||
#### Runtime
|
||||
+ Experimental feature: support for out-of-process volume plugins
|
||||
* The userland proxy can be disabled in favor of hairpin NAT using the daemon’s `--userland-proxy=false` flag
|
||||
* The `exec` command supports the `-u|--user` flag to specify the new process owner
|
||||
+ Default gateway for containers can be specified daemon-wide using the `--default-gateway` and `--default-gateway-v6` flags
|
||||
+ The CPU CFS (Completely Fair Scheduler) quota can be set in `docker run` using `--cpu-quota`
|
||||
+ Container block IO can be controlled in `docker run` using`--blkio-weight`
|
||||
+ ZFS support
|
||||
+ The `docker logs` command supports a `--since` argument
|
||||
+ UTS namespace can be shared with the host with `docker run --uts=host`
|
||||
|
||||
#### Quality
|
||||
* Networking stack was entirely rewritten as part of the libnetwork effort
|
||||
* Engine internals refactoring
|
||||
* Volumes code was entirely rewritten to support the plugins effort
|
||||
+ Sending SIGUSR1 to a daemon will dump all goroutines stacks without exiting
|
||||
|
||||
#### Build
|
||||
+ Support ${variable:-value} and ${variable:+value} syntax for environment variables
|
||||
+ Support resource management flags `--cgroup-parent`, `--cpu-period`, `--cpu-quota`, `--cpuset-cpus`, `--cpuset-mems`
|
||||
+ git context changes with branches and directories
|
||||
* The .dockerignore file support exclusion rules
|
||||
|
||||
#### Distribution
|
||||
+ Client support for v2 mirroring support for the official registry
|
||||
|
||||
#### Bugfixes
|
||||
* Firewalld is now supported and will automatically be used when available
|
||||
* mounting --device recursively
|
||||
|
||||
## 1.6.2 (2015-05-13)
|
||||
|
||||
#### Runtime
|
||||
|
||||
@@ -4,7 +4,7 @@ Want to hack on Docker? Awesome! We have a contributor's guide that explains
|
||||
[setting up a Docker development environment and the contribution
|
||||
process](https://docs.docker.com/project/who-written-for/).
|
||||
|
||||

|
||||

|
||||
|
||||
This page contains information about reporting issues as well as some tips and
|
||||
guidelines useful to experienced open source contributors. Finally, make sure
|
||||
|
||||
@@ -22,11 +22,6 @@ DOCKER_ENVS := \
|
||||
BIND_DIR := $(if $(BINDDIR),$(BINDDIR),$(if $(DOCKER_HOST),,bundles))
|
||||
DOCKER_MOUNT := $(if $(BIND_DIR),-v "$(CURDIR)/$(BIND_DIR):/go/src/github.com/docker/docker/$(BIND_DIR)")
|
||||
|
||||
# to allow `make DOCSDIR=docs docs-shell` (to create a bind mount in docs)
|
||||
DOCS_MOUNT := $(if $(DOCSDIR),-v $(CURDIR)/$(DOCSDIR):/$(DOCSDIR))
|
||||
|
||||
# to allow `make DOCSPORT=9000 docs`
|
||||
DOCSPORT := 8000
|
||||
|
||||
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
||||
DOCKER_IMAGE := docker-dev$(if $(GIT_BRANCH),:$(GIT_BRANCH))
|
||||
@@ -50,19 +45,6 @@ binary: build
|
||||
cross: build
|
||||
$(DOCKER_RUN_DOCKER) hack/make.sh binary cross
|
||||
|
||||
docs: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" mkdocs serve
|
||||
|
||||
docs-shell: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" bash
|
||||
|
||||
docs-release: docs-build
|
||||
$(DOCKER_RUN_DOCS) -e OPTIONS -e BUILD_ROOT -e DISTRIBUTION_ID \
|
||||
-v $(CURDIR)/docs/awsconfig:/docs/awsconfig \
|
||||
"$(DOCKER_DOCS_IMAGE)" ./release.sh
|
||||
|
||||
docs-test: docs-build
|
||||
$(DOCKER_RUN_DOCS) "$(DOCKER_DOCS_IMAGE)" ./test.sh
|
||||
|
||||
test: build
|
||||
$(DOCKER_RUN_DOCKER) hack/make.sh binary cross test-unit test-integration-cli test-docker-py
|
||||
@@ -85,13 +67,5 @@ shell: build
|
||||
build: bundles
|
||||
docker build -t "$(DOCKER_IMAGE)" .
|
||||
|
||||
docs-build:
|
||||
cp ./VERSION docs/VERSION
|
||||
echo "$(GIT_BRANCH)" > docs/GIT_BRANCH
|
||||
# echo "$(AWS_S3_BUCKET)" > docs/AWS_S3_BUCKET
|
||||
echo "$(GITCOMMIT)" > docs/GITCOMMIT
|
||||
docker pull docs/base
|
||||
docker build -t "$(DOCKER_DOCS_IMAGE)" docs
|
||||
|
||||
bundles:
|
||||
mkdir bundles
|
||||
|
||||
@@ -18,7 +18,7 @@ It benefits directly from the experience accumulated over several years
|
||||
of large-scale operation and support of hundreds of thousands of
|
||||
applications and databases.
|
||||
|
||||

|
||||

|
||||
|
||||
## Security Disclosure
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.Rea
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
req, err := http.NewRequest(method, fmt.Sprintf("/v%s%s", api.APIVERSION, path), params)
|
||||
req, err := http.NewRequest(method, fmt.Sprintf("/v%s%s", api.Version, path), params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func (cli *DockerCli) clientRequest(method, path string, in io.Reader, headers m
|
||||
if expectedPayload && in == nil {
|
||||
in = bytes.NewReader([]byte{})
|
||||
}
|
||||
req, err := http.NewRequest(method, fmt.Sprintf("/v%s%s", api.APIVERSION, path), in)
|
||||
req, err := http.NewRequest(method, fmt.Sprintf("/v%s%s", api.Version, path), in)
|
||||
if err != nil {
|
||||
return nil, "", -1, err
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ func (cli *DockerCli) CmdVersion(args ...string) error {
|
||||
if dockerversion.VERSION != "" {
|
||||
fmt.Fprintf(cli.out, "Client version: %s\n", dockerversion.VERSION)
|
||||
}
|
||||
fmt.Fprintf(cli.out, "Client API version: %s\n", api.APIVERSION)
|
||||
fmt.Fprintf(cli.out, "Client API version: %s\n", api.Version)
|
||||
fmt.Fprintf(cli.out, "Go version (client): %s\n", runtime.Version())
|
||||
if dockerversion.GITCOMMIT != "" {
|
||||
fmt.Fprintf(cli.out, "Git commit (client): %s\n", dockerversion.GITCOMMIT)
|
||||
|
||||
@@ -16,8 +16,14 @@ import (
|
||||
|
||||
// Common constants for daemon and client.
|
||||
const (
|
||||
APIVERSION version.Version = "1.19" // Current REST API version
|
||||
DefaultDockerfileName string = "Dockerfile" // Default filename with Docker commands, read by docker build
|
||||
// Current REST API version
|
||||
Version version.Version = "1.19"
|
||||
|
||||
// Minimun REST API version supported
|
||||
MinVersion version.Version = "1.12"
|
||||
|
||||
// Default filename with Docker commands, read by docker build
|
||||
DefaultDockerfileName string = "Dockerfile"
|
||||
)
|
||||
|
||||
type ByPrivatePort []types.Port
|
||||
|
||||
@@ -247,7 +247,7 @@ func (s *Server) postAuth(version version.Version, w http.ResponseWriter, r *htt
|
||||
func (s *Server) getVersion(version version.Version, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
|
||||
v := &types.Version{
|
||||
Version: dockerversion.VERSION,
|
||||
ApiVersion: api.APIVERSION,
|
||||
ApiVersion: api.Version,
|
||||
GitCommit: dockerversion.GITCOMMIT,
|
||||
GoVersion: runtime.Version(),
|
||||
Os: runtime.GOOS,
|
||||
@@ -903,6 +903,7 @@ func (s *Server) postContainersCreate(version version.Version, w http.ResponseWr
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
adjustCpuShares(version, hostConfig)
|
||||
|
||||
containerId, warnings, err := s.daemon.ContainerCreate(name, config, hostConfig)
|
||||
if err != nil {
|
||||
@@ -1100,6 +1101,11 @@ func (s *Server) postContainersAttach(version version.Version, w http.ResponseWr
|
||||
return fmt.Errorf("Missing parameter")
|
||||
}
|
||||
|
||||
cont, err := s.daemon.Get(vars["name"])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
inStream, outStream, err := hijackServer(w)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -1123,7 +1129,7 @@ func (s *Server) postContainersAttach(version version.Version, w http.ResponseWr
|
||||
Multiplex: version.GreaterThanOrEqualTo("1.6"),
|
||||
}
|
||||
|
||||
if err := s.daemon.ContainerAttachWithLogs(vars["name"], attachWithLogsConfig); err != nil {
|
||||
if err := s.daemon.ContainerAttachWithLogs(cont, attachWithLogsConfig); err != nil {
|
||||
fmt.Fprintf(outStream, "Error attaching: %s\n", err)
|
||||
}
|
||||
|
||||
@@ -1138,6 +1144,11 @@ func (s *Server) wsContainersAttach(version version.Version, w http.ResponseWrit
|
||||
return fmt.Errorf("Missing parameter")
|
||||
}
|
||||
|
||||
cont, err := s.daemon.Get(vars["name"])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
h := websocket.Handler(func(ws *websocket.Conn) {
|
||||
defer ws.Close()
|
||||
|
||||
@@ -1149,7 +1160,7 @@ func (s *Server) wsContainersAttach(version version.Version, w http.ResponseWrit
|
||||
Stream: boolValue(r, "stream"),
|
||||
}
|
||||
|
||||
if err := s.daemon.ContainerWsAttachWithLogs(vars["name"], wsAttachWithLogsConfig); err != nil {
|
||||
if err := s.daemon.ContainerWsAttachWithLogs(cont, wsAttachWithLogsConfig); err != nil {
|
||||
logrus.Errorf("Error attaching websocket: %s", err)
|
||||
}
|
||||
})
|
||||
@@ -1206,18 +1217,17 @@ func (s *Server) getImagesByName(version version.Version, w http.ResponseWriter,
|
||||
|
||||
func (s *Server) postBuild(version version.Version, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
|
||||
var (
|
||||
authConfig = &cliconfig.AuthConfig{}
|
||||
configFileEncoded = r.Header.Get("X-Registry-Config")
|
||||
configFile = &cliconfig.ConfigFile{}
|
||||
buildConfig = builder.NewBuildConfig()
|
||||
authConfigs = map[string]cliconfig.AuthConfig{}
|
||||
authConfigsEncoded = r.Header.Get("X-Registry-Config")
|
||||
buildConfig = builder.NewBuildConfig()
|
||||
)
|
||||
|
||||
if configFileEncoded != "" {
|
||||
configFileJson := base64.NewDecoder(base64.URLEncoding, strings.NewReader(configFileEncoded))
|
||||
if err := json.NewDecoder(configFileJson).Decode(configFile); err != nil {
|
||||
if authConfigsEncoded != "" {
|
||||
authConfigsJSON := base64.NewDecoder(base64.URLEncoding, strings.NewReader(authConfigsEncoded))
|
||||
if err := json.NewDecoder(authConfigsJSON).Decode(&authConfigs); err != nil {
|
||||
// for a pull it is not an error if no auth was given
|
||||
// to increase compatibility with the existing api it is defaulting to be empty
|
||||
configFile = &cliconfig.ConfigFile{}
|
||||
// to increase compatibility with the existing api it is defaulting
|
||||
// to be empty.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1244,8 +1254,7 @@ func (s *Server) postBuild(version version.Version, w http.ResponseWriter, r *ht
|
||||
buildConfig.SuppressOutput = boolValue(r, "q")
|
||||
buildConfig.NoCache = boolValue(r, "nocache")
|
||||
buildConfig.ForceRemove = boolValue(r, "forcerm")
|
||||
buildConfig.AuthConfig = authConfig
|
||||
buildConfig.ConfigFile = configFile
|
||||
buildConfig.AuthConfigs = authConfigs
|
||||
buildConfig.MemorySwap = int64ValueOrZero(r, "memswap")
|
||||
buildConfig.Memory = int64ValueOrZero(r, "memory")
|
||||
buildConfig.CpuShares = int64ValueOrZero(r, "cpushares")
|
||||
@@ -1474,14 +1483,18 @@ func makeHttpHandler(logging bool, localMethod string, localRoute string, handle
|
||||
}
|
||||
version := version.Version(mux.Vars(r)["version"])
|
||||
if version == "" {
|
||||
version = api.APIVERSION
|
||||
version = api.Version
|
||||
}
|
||||
if corsHeaders != "" {
|
||||
writeCorsHeaders(w, r, corsHeaders)
|
||||
}
|
||||
|
||||
if version.GreaterThan(api.APIVERSION) {
|
||||
http.Error(w, fmt.Errorf("client and server don't have same version (client API version: %s, server API version: %s)", version, api.APIVERSION).Error(), http.StatusBadRequest)
|
||||
if version.GreaterThan(api.Version) {
|
||||
http.Error(w, fmt.Errorf("client is newer than server (client API version: %s, server API version: %s)", version, api.Version).Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
if version.LessThan(api.MinVersion) {
|
||||
http.Error(w, fmt.Errorf("client is too old, minimum supported API version is %s, please upgrade your client to a newer version", api.MinVersion).Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -8,12 +8,21 @@ import (
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/docker/docker/daemon"
|
||||
"github.com/docker/docker/pkg/sockets"
|
||||
"github.com/docker/docker/pkg/systemd"
|
||||
"github.com/docker/docker/pkg/version"
|
||||
"github.com/docker/docker/runconfig"
|
||||
"github.com/docker/libnetwork/portallocator"
|
||||
)
|
||||
|
||||
const (
|
||||
// See http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/tree/kernel/sched/sched.h?id=8cd9234c64c584432f6992fe944ca9e46ca8ea76#n269
|
||||
linuxMinCpuShares = 2
|
||||
linuxMaxCpuShares = 262144
|
||||
)
|
||||
|
||||
// newServer sets up the required serverClosers and does protocol specific checking.
|
||||
func (s *Server) newServer(proto, addr string) ([]serverCloser, error) {
|
||||
var (
|
||||
@@ -96,3 +105,18 @@ func allocateDaemonPort(addr string) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func adjustCpuShares(version version.Version, hostConfig *runconfig.HostConfig) {
|
||||
if version.LessThan("1.19") {
|
||||
if hostConfig.CpuShares > 0 {
|
||||
// Handle unsupported CpuShares
|
||||
if hostConfig.CpuShares < linuxMinCpuShares {
|
||||
logrus.Warnf("Changing requested CpuShares of %d to minimum allowed of %d", hostConfig.CpuShares, linuxMinCpuShares)
|
||||
hostConfig.CpuShares = linuxMinCpuShares
|
||||
} else if hostConfig.CpuShares > linuxMaxCpuShares {
|
||||
logrus.Warnf("Changing requested CpuShares of %d to maximum allowed of %d", hostConfig.CpuShares, linuxMaxCpuShares)
|
||||
hostConfig.CpuShares = linuxMaxCpuShares
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
// +build linux
|
||||
|
||||
package server
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/docker/docker/pkg/version"
|
||||
"github.com/docker/docker/runconfig"
|
||||
)
|
||||
|
||||
func TestAdjustCpuSharesOldApi(t *testing.T) {
|
||||
apiVersion := version.Version("1.18")
|
||||
hostConfig := &runconfig.HostConfig{
|
||||
CpuShares: linuxMinCpuShares - 1,
|
||||
}
|
||||
adjustCpuShares(apiVersion, hostConfig)
|
||||
if hostConfig.CpuShares != linuxMinCpuShares {
|
||||
t.Errorf("Expected CpuShares to be %d", linuxMinCpuShares)
|
||||
}
|
||||
|
||||
hostConfig.CpuShares = linuxMaxCpuShares + 1
|
||||
adjustCpuShares(apiVersion, hostConfig)
|
||||
if hostConfig.CpuShares != linuxMaxCpuShares {
|
||||
t.Errorf("Expected CpuShares to be %d", linuxMaxCpuShares)
|
||||
}
|
||||
|
||||
hostConfig.CpuShares = 0
|
||||
adjustCpuShares(apiVersion, hostConfig)
|
||||
if hostConfig.CpuShares != 0 {
|
||||
t.Error("Expected CpuShares to be unchanged")
|
||||
}
|
||||
|
||||
hostConfig.CpuShares = 1024
|
||||
adjustCpuShares(apiVersion, hostConfig)
|
||||
if hostConfig.CpuShares != 1024 {
|
||||
t.Error("Expected CpuShares to be unchanged")
|
||||
}
|
||||
}
|
||||
|
||||
func TestAdjustCpuSharesNoAdjustment(t *testing.T) {
|
||||
apiVersion := version.Version("1.19")
|
||||
hostConfig := &runconfig.HostConfig{
|
||||
CpuShares: linuxMinCpuShares - 1,
|
||||
}
|
||||
adjustCpuShares(apiVersion, hostConfig)
|
||||
if hostConfig.CpuShares != linuxMinCpuShares-1 {
|
||||
t.Errorf("Expected CpuShares to be %d", linuxMinCpuShares-1)
|
||||
}
|
||||
|
||||
hostConfig.CpuShares = linuxMaxCpuShares + 1
|
||||
adjustCpuShares(apiVersion, hostConfig)
|
||||
if hostConfig.CpuShares != linuxMaxCpuShares+1 {
|
||||
t.Errorf("Expected CpuShares to be %d", linuxMaxCpuShares+1)
|
||||
}
|
||||
|
||||
hostConfig.CpuShares = 0
|
||||
adjustCpuShares(apiVersion, hostConfig)
|
||||
if hostConfig.CpuShares != 0 {
|
||||
t.Error("Expected CpuShares to be unchanged")
|
||||
}
|
||||
|
||||
hostConfig.CpuShares = 1024
|
||||
adjustCpuShares(apiVersion, hostConfig)
|
||||
if hostConfig.CpuShares != 1024 {
|
||||
t.Error("Expected CpuShares to be unchanged")
|
||||
}
|
||||
}
|
||||
@@ -48,3 +48,6 @@ func (s *Server) AcceptConnections(d *daemon.Daemon) {
|
||||
func allocateDaemonPort(addr string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func adjustCpuShares(version version.Version, hostConfig *runconfig.HostConfig) {
|
||||
}
|
||||
|
||||
@@ -98,8 +98,8 @@ type Builder struct {
|
||||
// the final configs of the Dockerfile but dont want the layers
|
||||
disableCommit bool
|
||||
|
||||
AuthConfig *cliconfig.AuthConfig
|
||||
ConfigFile *cliconfig.ConfigFile
|
||||
// Registry server auth configs used to pull images when handling `FROM`.
|
||||
AuthConfigs map[string]cliconfig.AuthConfig
|
||||
|
||||
// Deprecated, original writer used for ImagePull. To be removed.
|
||||
OutOld io.Writer
|
||||
|
||||
@@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/docker/docker/builder/parser"
|
||||
"github.com/docker/docker/cliconfig"
|
||||
"github.com/docker/docker/daemon"
|
||||
"github.com/docker/docker/graph"
|
||||
imagepkg "github.com/docker/docker/image"
|
||||
@@ -446,15 +447,19 @@ func (b *Builder) pullImage(name string) (*imagepkg.Image, error) {
|
||||
tag = "latest"
|
||||
}
|
||||
|
||||
pullRegistryAuth := b.AuthConfig
|
||||
if len(b.ConfigFile.AuthConfigs) > 0 {
|
||||
pullRegistryAuth := &cliconfig.AuthConfig{}
|
||||
if len(b.AuthConfigs) > 0 {
|
||||
// The request came with a full auth config file, we prefer to use that
|
||||
repoInfo, err := b.Daemon.RegistryService.ResolveRepository(remote)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
resolvedAuth := registry.ResolveAuthConfig(b.ConfigFile, repoInfo.Index)
|
||||
pullRegistryAuth = &resolvedAuth
|
||||
|
||||
resolvedConfig := registry.ResolveAuthConfig(
|
||||
&cliconfig.ConfigFile{AuthConfigs: b.AuthConfigs},
|
||||
repoInfo.Index,
|
||||
)
|
||||
pullRegistryAuth = &resolvedConfig
|
||||
}
|
||||
|
||||
imagePullConfig := &graph.ImagePullConfig{
|
||||
|
||||
@@ -53,8 +53,7 @@ type Config struct {
|
||||
CpuSetCpus string
|
||||
CpuSetMems string
|
||||
CgroupParent string
|
||||
AuthConfig *cliconfig.AuthConfig
|
||||
ConfigFile *cliconfig.ConfigFile
|
||||
AuthConfigs map[string]cliconfig.AuthConfig
|
||||
|
||||
Stdout io.Writer
|
||||
Context io.ReadCloser
|
||||
@@ -79,9 +78,8 @@ func (b *Config) WaitCancelled() <-chan struct{} {
|
||||
|
||||
func NewBuildConfig() *Config {
|
||||
return &Config{
|
||||
AuthConfig: &cliconfig.AuthConfig{},
|
||||
ConfigFile: &cliconfig.ConfigFile{},
|
||||
cancelled: make(chan struct{}),
|
||||
AuthConfigs: map[string]cliconfig.AuthConfig{},
|
||||
cancelled: make(chan struct{}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,8 +158,7 @@ func Build(d *daemon.Daemon, buildConfig *Config) error {
|
||||
Pull: buildConfig.Pull,
|
||||
OutOld: buildConfig.Stdout,
|
||||
StreamFormatter: sf,
|
||||
AuthConfig: buildConfig.AuthConfig,
|
||||
ConfigFile: buildConfig.ConfigFile,
|
||||
AuthConfigs: buildConfig.AuthConfigs,
|
||||
dockerfileName: buildConfig.DockerfileName,
|
||||
cpuShares: buildConfig.CpuShares,
|
||||
cpuPeriod: buildConfig.CpuPeriod,
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
FROM centos:7
|
||||
|
||||
RUN yum groupinstall -y "Development Tools"
|
||||
RUN yum -y swap -- remove systemd-container systemd-container-libs -- install systemd systemd-libs
|
||||
RUN yum install -y btrfs-progs-devel device-mapper-devel glibc-static libselinux-devel sqlite-devel tar
|
||||
|
||||
ENV GO_VERSION 1.4.2
|
||||
|
||||
@@ -38,6 +38,10 @@ for version in "${versions[@]}"; do
|
||||
centos:*)
|
||||
# get "Development Tools" packages dependencies
|
||||
echo 'RUN yum groupinstall -y "Development Tools"' >> "$version/Dockerfile"
|
||||
|
||||
if [[ "$version" == "centos-7" ]]; then
|
||||
echo 'RUN yum -y swap -- remove systemd-container systemd-container-libs -- install systemd systemd-libs' >> "$version/Dockerfile"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo 'RUN yum install -y @development-tools fedora-packager' >> "$version/Dockerfile"
|
||||
|
||||
@@ -7,7 +7,6 @@ DOCKER_LOGFILE=${DOCKER_LOGFILE:-/var/log/${SVCNAME}.log}
|
||||
DOCKER_PIDFILE=${DOCKER_PIDFILE:-/run/${SVCNAME}.pid}
|
||||
DOCKER_BINARY=${DOCKER_BINARY:-/usr/bin/docker}
|
||||
DOCKER_OPTS=${DOCKER_OPTS:-}
|
||||
UNSHARE_BINARY=${UNSHARE_BINARY:-/usr/bin/unshare}
|
||||
|
||||
start() {
|
||||
checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE"
|
||||
@@ -17,12 +16,11 @@ start() {
|
||||
|
||||
ebegin "Starting docker daemon"
|
||||
start-stop-daemon --start --background \
|
||||
--exec "$UNSHARE_BINARY" \
|
||||
--exec "$DOCKER_BINARY" \
|
||||
--pidfile "$DOCKER_PIDFILE" \
|
||||
--stdout "$DOCKER_LOGFILE" \
|
||||
--stderr "$DOCKER_LOGFILE" \
|
||||
-- --mount \
|
||||
-- "$DOCKER_BINARY" -d -p "$DOCKER_PIDFILE" \
|
||||
-- -d -p "$DOCKER_PIDFILE" \
|
||||
$DOCKER_OPTS
|
||||
eend $?
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ DOCKER_SSD_PIDFILE=/var/run/$BASE-ssd.pid
|
||||
DOCKER_LOGFILE=/var/log/$BASE.log
|
||||
DOCKER_OPTS=
|
||||
DOCKER_DESC="Docker"
|
||||
UNSHARE=${UNSHARE:-/usr/bin/unshare}
|
||||
|
||||
# Get lsb functions
|
||||
. /lib/lsb/init-functions
|
||||
@@ -100,11 +99,11 @@ case "$1" in
|
||||
log_begin_msg "Starting $DOCKER_DESC: $BASE"
|
||||
start-stop-daemon --start --background \
|
||||
--no-close \
|
||||
--exec "$UNSHARE" \
|
||||
--exec "$DOCKER" \
|
||||
--pidfile "$DOCKER_SSD_PIDFILE" \
|
||||
--make-pidfile \
|
||||
-- --mount \
|
||||
-- "$DOCKER" -d -p "$DOCKER_PIDFILE" \
|
||||
-- \
|
||||
-d -p "$DOCKER_PIDFILE" \
|
||||
$DOCKER_OPTS \
|
||||
>> "$DOCKER_LOGFILE" 2>&1
|
||||
log_end_msg $?
|
||||
|
||||
@@ -39,7 +39,7 @@ script
|
||||
if [ -f /etc/default/$UPSTART_JOB ]; then
|
||||
. /etc/default/$UPSTART_JOB
|
||||
fi
|
||||
exec unshare -m -- "$DOCKER" -d $DOCKER_OPTS
|
||||
exec "$DOCKER" -d $DOCKER_OPTS
|
||||
end script
|
||||
|
||||
# Don't emit "started" event until docker.sock is ready.
|
||||
|
||||
@@ -14,12 +14,7 @@ type ContainerAttachWithLogsConfig struct {
|
||||
Multiplex bool
|
||||
}
|
||||
|
||||
func (daemon *Daemon) ContainerAttachWithLogs(name string, c *ContainerAttachWithLogsConfig) error {
|
||||
container, err := daemon.Get(name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
func (daemon *Daemon) ContainerAttachWithLogs(container *Container, c *ContainerAttachWithLogsConfig) error {
|
||||
var errStream io.Writer
|
||||
|
||||
if !container.Config.Tty && c.Multiplex {
|
||||
@@ -51,11 +46,6 @@ type ContainerWsAttachWithLogsConfig struct {
|
||||
Logs, Stream bool
|
||||
}
|
||||
|
||||
func (daemon *Daemon) ContainerWsAttachWithLogs(name string, c *ContainerWsAttachWithLogsConfig) error {
|
||||
container, err := daemon.Get(name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
func (daemon *Daemon) ContainerWsAttachWithLogs(container *Container, c *ContainerWsAttachWithLogsConfig) error {
|
||||
return container.AttachWithLogs(c.InStream, c.OutStream, c.ErrStream, c.Logs, c.Stream)
|
||||
}
|
||||
|
||||
@@ -14,24 +14,24 @@ const (
|
||||
// CommonConfig defines the configuration of a docker daemon which are
|
||||
// common across platforms.
|
||||
type CommonConfig struct {
|
||||
AutoRestart bool
|
||||
Context map[string][]string
|
||||
CorsHeaders string
|
||||
DisableNetwork bool
|
||||
Dns []string
|
||||
DnsSearch []string
|
||||
EnableCors bool
|
||||
ExecDriver string
|
||||
ExecOptions []string
|
||||
ExecRoot string
|
||||
GraphDriver string
|
||||
GraphOptions []string
|
||||
Labels []string
|
||||
LogConfig runconfig.LogConfig
|
||||
Mtu int
|
||||
Pidfile string
|
||||
Root string
|
||||
TrustKeyPath string
|
||||
AutoRestart bool
|
||||
Context map[string][]string
|
||||
CorsHeaders string
|
||||
DisableBridge bool
|
||||
Dns []string
|
||||
DnsSearch []string
|
||||
EnableCors bool
|
||||
ExecDriver string
|
||||
ExecOptions []string
|
||||
ExecRoot string
|
||||
GraphDriver string
|
||||
GraphOptions []string
|
||||
Labels []string
|
||||
LogConfig runconfig.LogConfig
|
||||
Mtu int
|
||||
Pidfile string
|
||||
Root string
|
||||
TrustKeyPath string
|
||||
}
|
||||
|
||||
// InstallCommonFlags adds command-line options to the top-level flag parser for
|
||||
|
||||
@@ -24,6 +24,7 @@ import (
|
||||
"github.com/docker/docker/nat"
|
||||
"github.com/docker/docker/pkg/archive"
|
||||
"github.com/docker/docker/pkg/broadcastwriter"
|
||||
"github.com/docker/docker/pkg/fileutils"
|
||||
"github.com/docker/docker/pkg/ioutils"
|
||||
"github.com/docker/docker/pkg/jsonlog"
|
||||
"github.com/docker/docker/pkg/mount"
|
||||
@@ -599,11 +600,20 @@ func (container *Container) Copy(resource string) (io.ReadCloser, error) {
|
||||
return nil, err
|
||||
}
|
||||
for _, m := range mounts {
|
||||
dest, err := container.GetResourcePath(m.Destination)
|
||||
var dest string
|
||||
dest, err = container.GetResourcePath(m.Destination)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := mount.Mount(m.Source, dest, "bind", "rbind,ro"); err != nil {
|
||||
var stat os.FileInfo
|
||||
stat, err = os.Stat(m.Source)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err = fileutils.CreateIfNotExists(dest, stat.IsDir()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err = mount.Mount(m.Source, dest, "bind", "rbind,ro"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
@@ -469,7 +469,7 @@ func (container *Container) buildJoinOptions() ([]libnetwork.EndpointOption, err
|
||||
logrus.Error(err)
|
||||
}
|
||||
|
||||
if c != nil && !container.daemon.config.DisableNetwork && container.hostConfig.NetworkMode.IsPrivate() {
|
||||
if c != nil && !container.daemon.config.DisableBridge && container.hostConfig.NetworkMode.IsPrivate() {
|
||||
logrus.Debugf("Update /etc/hosts of %s for alias %s with ip %s", c.ID, ref.Name, container.NetworkSettings.IPAddress)
|
||||
joinOptions = append(joinOptions, libnetwork.JoinOptionParentUpdate(c.NetworkSettings.EndpointID, ref.Name, container.NetworkSettings.IPAddress))
|
||||
if c.NetworkSettings.EndpointID != "" {
|
||||
@@ -753,6 +753,11 @@ func (container *Container) AllocateNetwork() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
if mode.IsBridge() && container.daemon.config.DisableBridge {
|
||||
container.Config.NetworkDisabled = true
|
||||
return nil
|
||||
}
|
||||
|
||||
var err error
|
||||
|
||||
n, err := container.daemon.netController.NetworkByName(string(mode))
|
||||
@@ -817,10 +822,6 @@ func (container *Container) initializeNetworking() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
if container.daemon.config.DisableNetwork {
|
||||
container.Config.NetworkDisabled = true
|
||||
}
|
||||
|
||||
if container.hostConfig.NetworkMode.IsHost() {
|
||||
container.Config.Hostname, err = os.Hostname()
|
||||
if err != nil {
|
||||
@@ -939,7 +940,7 @@ func (container *Container) getNetworkedContainer() (*Container, error) {
|
||||
}
|
||||
|
||||
func (container *Container) ReleaseNetwork() {
|
||||
if container.hostConfig.NetworkMode.IsContainer() || container.daemon.config.DisableNetwork {
|
||||
if container.hostConfig.NetworkMode.IsContainer() || container.Config.NetworkDisabled {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package daemon
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
@@ -31,6 +32,7 @@ import (
|
||||
"github.com/docker/docker/daemon/network"
|
||||
"github.com/docker/docker/graph"
|
||||
"github.com/docker/docker/image"
|
||||
"github.com/docker/docker/nat"
|
||||
"github.com/docker/docker/pkg/archive"
|
||||
"github.com/docker/docker/pkg/broadcastwriter"
|
||||
"github.com/docker/docker/pkg/fileutils"
|
||||
@@ -48,6 +50,7 @@ import (
|
||||
"github.com/docker/docker/utils"
|
||||
volumedrivers "github.com/docker/docker/volume/drivers"
|
||||
"github.com/docker/docker/volume/local"
|
||||
"github.com/docker/libcontainer/netlink"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -672,13 +675,15 @@ func NewDaemon(config *Config, registryService *registry.Service) (daemon *Daemo
|
||||
if config.Bridge.Iface != "" && config.Bridge.IP != "" {
|
||||
return nil, fmt.Errorf("You specified -b & --bip, mutually exclusive options. Please specify only one.")
|
||||
}
|
||||
setDefaultMtu(config)
|
||||
|
||||
if !config.Bridge.EnableIPTables && !config.Bridge.InterContainerCommunication {
|
||||
return nil, fmt.Errorf("You specified --iptables=false with --icc=false. ICC uses iptables to function. Please set --icc or --iptables to true.")
|
||||
}
|
||||
if !config.Bridge.EnableIPTables && config.Bridge.EnableIPMasq {
|
||||
config.Bridge.EnableIPMasq = false
|
||||
}
|
||||
config.DisableNetwork = config.Bridge.Iface == disableNetworkBridge
|
||||
config.DisableBridge = config.Bridge.Iface == disableNetworkBridge
|
||||
|
||||
// Check that the system is supported and we have sufficient privileges
|
||||
if runtime.GOOS != "linux" {
|
||||
@@ -815,11 +820,9 @@ func NewDaemon(config *Config, registryService *registry.Service) (daemon *Daemo
|
||||
return nil, fmt.Errorf("Couldn't create Tag store: %s", err)
|
||||
}
|
||||
|
||||
if !config.DisableNetwork {
|
||||
d.netController, err = initNetworkController(config)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Error initializing network controller: %v", err)
|
||||
}
|
||||
d.netController, err = initNetworkController(config)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Error initializing network controller: %v", err)
|
||||
}
|
||||
|
||||
graphdbPath := path.Join(config.Root, "linkgraph.db")
|
||||
@@ -907,12 +910,22 @@ func initNetworkController(config *Config) (libnetwork.NetworkController, error)
|
||||
return nil, fmt.Errorf("Error creating default \"host\" network: %v", err)
|
||||
}
|
||||
|
||||
// Initialize default driver "bridge"
|
||||
if !config.DisableBridge {
|
||||
// Initialize default driver "bridge"
|
||||
if err := initBridgeDriver(controller, config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return controller, nil
|
||||
}
|
||||
|
||||
func initBridgeDriver(controller libnetwork.NetworkController, config *Config) error {
|
||||
option := options.Generic{
|
||||
"EnableIPForwarding": config.Bridge.EnableIPForward}
|
||||
|
||||
if err := controller.ConfigureNetworkDriver("bridge", options.Generic{netlabel.GenericData: option}); err != nil {
|
||||
return nil, fmt.Errorf("Error initializing bridge driver: %v", err)
|
||||
return fmt.Errorf("Error initializing bridge driver: %v", err)
|
||||
}
|
||||
|
||||
netOption := options.Generic{
|
||||
@@ -927,7 +940,7 @@ func initNetworkController(config *Config) (libnetwork.NetworkController, error)
|
||||
if config.Bridge.IP != "" {
|
||||
ip, bipNet, err := net.ParseCIDR(config.Bridge.IP)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return err
|
||||
}
|
||||
|
||||
bipNet.IP = ip
|
||||
@@ -937,7 +950,7 @@ func initNetworkController(config *Config) (libnetwork.NetworkController, error)
|
||||
if config.Bridge.FixedCIDR != "" {
|
||||
_, fCIDR, err := net.ParseCIDR(config.Bridge.FixedCIDR)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return err
|
||||
}
|
||||
|
||||
netOption["FixedCIDR"] = fCIDR
|
||||
@@ -946,7 +959,7 @@ func initNetworkController(config *Config) (libnetwork.NetworkController, error)
|
||||
if config.Bridge.FixedCIDRv6 != "" {
|
||||
_, fCIDRv6, err := net.ParseCIDR(config.Bridge.FixedCIDRv6)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return err
|
||||
}
|
||||
|
||||
netOption["FixedCIDRv6"] = fCIDRv6
|
||||
@@ -966,16 +979,15 @@ func initNetworkController(config *Config) (libnetwork.NetworkController, error)
|
||||
}
|
||||
|
||||
// Initialize default network on "bridge" with the same name
|
||||
_, err = controller.NewNetwork("bridge", "bridge",
|
||||
_, err := controller.NewNetwork("bridge", "bridge",
|
||||
libnetwork.NetworkOptionGeneric(options.Generic{
|
||||
netlabel.GenericData: netOption,
|
||||
netlabel.EnableIPv6: config.Bridge.EnableIPv6,
|
||||
}))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Error creating default \"bridge\" network: %v", err)
|
||||
return fmt.Errorf("Error creating default \"bridge\" network: %v", err)
|
||||
}
|
||||
|
||||
return controller, nil
|
||||
return nil
|
||||
}
|
||||
|
||||
func (daemon *Daemon) Shutdown() error {
|
||||
@@ -1186,6 +1198,13 @@ func (daemon *Daemon) verifyHostConfig(hostConfig *runconfig.HostConfig) ([]stri
|
||||
return warnings, nil
|
||||
}
|
||||
|
||||
for port := range hostConfig.PortBindings {
|
||||
_, portStr := nat.SplitProtoPort(string(port))
|
||||
if _, err := nat.ParsePort(portStr); err != nil {
|
||||
return warnings, fmt.Errorf("Invalid port specification: %s", portStr)
|
||||
}
|
||||
}
|
||||
|
||||
if hostConfig.LxcConf.Len() > 0 && !strings.Contains(daemon.ExecutionDriver().Name(), "lxc") {
|
||||
return warnings, fmt.Errorf("Cannot use --lxc-conf with execdriver: %s", daemon.ExecutionDriver().Name())
|
||||
}
|
||||
@@ -1262,3 +1281,30 @@ func (daemon *Daemon) newBaseContainer(id string) CommonContainer {
|
||||
root: daemon.containerRoot(id),
|
||||
}
|
||||
}
|
||||
|
||||
func setDefaultMtu(config *Config) {
|
||||
// do nothing if the config does not have the default 0 value.
|
||||
if config.Mtu != 0 {
|
||||
return
|
||||
}
|
||||
config.Mtu = defaultNetworkMtu
|
||||
if routeMtu, err := getDefaultRouteMtu(); err == nil {
|
||||
config.Mtu = routeMtu
|
||||
}
|
||||
}
|
||||
|
||||
var errNoDefaultRoute = errors.New("no default route was found")
|
||||
|
||||
// getDefaultRouteMtu returns the MTU for the default route's interface.
|
||||
func getDefaultRouteMtu() (int, error) {
|
||||
routes, err := netlink.NetworkGetRoutes()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
for _, r := range routes {
|
||||
if r.Default {
|
||||
return r.Iface.MTU, nil
|
||||
}
|
||||
}
|
||||
return 0, errNoDefaultRoute
|
||||
}
|
||||
|
||||
@@ -109,7 +109,6 @@ func (d *Daemon) getActiveContainer(name string) (*Container, error) {
|
||||
}
|
||||
|
||||
func (d *Daemon) ContainerExecCreate(config *runconfig.ExecConfig) (string, error) {
|
||||
|
||||
// Not all drivers support Exec (LXC for example)
|
||||
if err := checkExecSupport(d.execDriver.Name()); err != nil {
|
||||
return "", err
|
||||
@@ -123,11 +122,16 @@ func (d *Daemon) ContainerExecCreate(config *runconfig.ExecConfig) (string, erro
|
||||
cmd := runconfig.NewCommand(config.Cmd...)
|
||||
entrypoint, args := d.getEntrypointAndArgs(runconfig.NewEntrypoint(), cmd)
|
||||
|
||||
user := config.User
|
||||
if len(user) == 0 {
|
||||
user = container.Config.User
|
||||
}
|
||||
|
||||
processConfig := execdriver.ProcessConfig{
|
||||
Tty: config.Tty,
|
||||
Entrypoint: entrypoint,
|
||||
Arguments: args,
|
||||
User: config.User,
|
||||
User: user,
|
||||
}
|
||||
|
||||
execConfig := &execConfig{
|
||||
|
||||
@@ -104,8 +104,8 @@ type DeviceSet struct {
|
||||
thinpBlockSize uint32
|
||||
thinPoolDevice string
|
||||
Transaction `json:"-"`
|
||||
overrideUdevSyncCheck bool
|
||||
deferredRemove bool // use deferred removal
|
||||
overrideUdevSyncCheck bool
|
||||
}
|
||||
|
||||
type DiskUsage struct {
|
||||
@@ -1033,10 +1033,7 @@ func (devices *DeviceSet) initDevmapper(doInit bool) error {
|
||||
|
||||
// https://github.com/docker/docker/issues/4036
|
||||
if supported := devicemapper.UdevSetSyncSupport(true); !supported {
|
||||
logrus.Errorf("Udev sync is not supported. This will lead to unexpected behavior, data loss and errors. For more information, see https://docs.docker.com/reference/commandline/cli/#daemon-storage-driver-option")
|
||||
if !devices.overrideUdevSyncCheck {
|
||||
return graphdriver.ErrNotSupported
|
||||
}
|
||||
logrus.Warn("Udev sync is not supported. This will lead to unexpected behavior, data loss and errors. For more information, see https://docs.docker.com/reference/commandline/cli/#daemon-storage-driver-option")
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(devices.metadataDir(), 0700); err != nil && !os.IsExist(err) {
|
||||
|
||||
@@ -168,7 +168,7 @@ func scanPriorDrivers(root string) []string {
|
||||
priorDrivers := []string{}
|
||||
for driver := range drivers {
|
||||
p := filepath.Join(root, driver)
|
||||
if _, err := os.Stat(p); err == nil {
|
||||
if _, err := os.Stat(p); err == nil && driver != "vfs" {
|
||||
priorDrivers = append(priorDrivers, driver)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/docker/docker/daemon/execdriver"
|
||||
"github.com/docker/libcontainer"
|
||||
"github.com/docker/libcontainer/cgroups"
|
||||
"github.com/docker/libnetwork/sandbox"
|
||||
)
|
||||
|
||||
func (daemon *Daemon) ContainerStats(name string, stream bool, out io.Writer) error {
|
||||
@@ -19,6 +20,10 @@ func (daemon *Daemon) ContainerStats(name string, stream bool, out io.Writer) er
|
||||
var preCpuStats types.CpuStats
|
||||
getStat := func(v interface{}) *types.Stats {
|
||||
update := v.(*execdriver.ResourceStats)
|
||||
// Retrieve the nw statistics from libnetwork and inject them in the Stats
|
||||
if nwStats, err := daemon.getNetworkStats(name); err == nil {
|
||||
update.Stats.Interfaces = nwStats
|
||||
}
|
||||
ss := convertToAPITypes(update.Stats)
|
||||
ss.PreCpuStats = preCpuStats
|
||||
ss.MemoryStats.Limit = uint64(update.MemoryLimit)
|
||||
@@ -118,3 +123,46 @@ func copyBlkioEntry(entries []cgroups.BlkioStatEntry) []types.BlkioStatEntry {
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func (daemon *Daemon) getNetworkStats(name string) ([]*libcontainer.NetworkInterface, error) {
|
||||
var list []*libcontainer.NetworkInterface
|
||||
|
||||
c, err := daemon.Get(name)
|
||||
if err != nil {
|
||||
return list, err
|
||||
}
|
||||
|
||||
nw, err := daemon.netController.NetworkByID(c.NetworkSettings.NetworkID)
|
||||
if err != nil {
|
||||
return list, err
|
||||
}
|
||||
ep, err := nw.EndpointByID(c.NetworkSettings.EndpointID)
|
||||
if err != nil {
|
||||
return list, err
|
||||
}
|
||||
|
||||
stats, err := ep.Statistics()
|
||||
if err != nil {
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Convert libnetwork nw stats into libcontainer nw stats
|
||||
for ifName, ifStats := range stats {
|
||||
list = append(list, convertLnNetworkStats(ifName, ifStats))
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func convertLnNetworkStats(name string, stats *sandbox.InterfaceStatistics) *libcontainer.NetworkInterface {
|
||||
n := &libcontainer.NetworkInterface{Name: name}
|
||||
n.RxBytes = stats.RxBytes
|
||||
n.RxPackets = stats.RxPackets
|
||||
n.RxErrors = stats.RxErrors
|
||||
n.RxDropped = stats.RxDropped
|
||||
n.TxBytes = stats.TxBytes
|
||||
n.TxPackets = stats.TxPackets
|
||||
n.TxErrors = stats.TxErrors
|
||||
n.TxDropped = stats.TxDropped
|
||||
return n
|
||||
}
|
||||
|
||||
@@ -191,11 +191,16 @@ func (daemon *Daemon) registerMountPoints(container *Container, hostConfig *runc
|
||||
}
|
||||
|
||||
for _, m := range c.MountPoints {
|
||||
cp := m
|
||||
cp.RW = m.RW && mode != "ro"
|
||||
cp := &mountPoint{
|
||||
Name: m.Name,
|
||||
Source: m.Source,
|
||||
RW: m.RW && mode != "ro",
|
||||
Driver: m.Driver,
|
||||
Destination: m.Destination,
|
||||
}
|
||||
|
||||
if len(m.Source) == 0 {
|
||||
v, err := createVolume(m.Name, m.Driver)
|
||||
if len(cp.Source) == 0 {
|
||||
v, err := createVolume(cp.Name, cp.Driver)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1,163 +1,13 @@
|
||||
#
|
||||
# See the top level Makefile in https://github.com/docker/docker for usage.
|
||||
#
|
||||
FROM docs/base:latest
|
||||
MAINTAINER Sven Dowideit <SvenDowideit@docker.com> (@SvenDowideit)
|
||||
FROM docs/base:hugo
|
||||
MAINTAINER Mary Anthony <mary@docker.com> (@moxiegirl)
|
||||
|
||||
# This section ensures we pull the correct version of each
|
||||
# sub project
|
||||
ENV COMPOSE_BRANCH release
|
||||
ENV SWARM_BRANCH v0.2.0
|
||||
ENV MACHINE_BRANCH docs
|
||||
ENV DISTRIB_BRANCH docs
|
||||
ENV KITEMATIC_BRANCH master
|
||||
|
||||
|
||||
# TODO: need the full repo source to get the git version info
|
||||
# To get the git info for this repo
|
||||
COPY . /src
|
||||
|
||||
# Reset the /docs dir so we can replace the theme meta with the new repo's git info
|
||||
# RUN git reset --hard
|
||||
COPY . /docs/content/
|
||||
|
||||
# Then copy the desired docs into the /docs/sources/ dir
|
||||
COPY ./sources/ /docs/sources
|
||||
WORKDIR /docs/content
|
||||
|
||||
COPY ./VERSION VERSION
|
||||
RUN /docs/content/touch-up.sh
|
||||
|
||||
# adding the image spec will require Docker 1.5 and `docker build -f docs/Dockerfile .`
|
||||
#COPY ./image/spec/v1.md /docs/sources/reference/image-spec-v1.md
|
||||
|
||||
# TODO: don't do this - look at merging the yml file in build.sh
|
||||
COPY ./mkdocs.yml ./s3_website.json ./release.sh ./
|
||||
|
||||
#######################
|
||||
# Docker Distribution
|
||||
########################
|
||||
|
||||
#ADD https://raw.githubusercontent.com/docker/distribution/${DISTRIB_BRANCH}/docs/mkdocs.yml /docs/mkdocs-distribution.yml
|
||||
|
||||
ADD https://raw.githubusercontent.com/docker/distribution/${DISTRIB_BRANCH}/docs/images/notifications.png \
|
||||
https://raw.githubusercontent.com/docker/distribution/${DISTRIB_BRANCH}/docs/images/registry.png \
|
||||
/docs/sources/registry/images/
|
||||
|
||||
ADD https://raw.githubusercontent.com/docker/distribution/${DISTRIB_BRANCH}/docs/index.md \
|
||||
https://raw.githubusercontent.com/docker/distribution/${DISTRIB_BRANCH}/docs/deploying.md \
|
||||
https://raw.githubusercontent.com/docker/distribution/${DISTRIB_BRANCH}/docs/configuration.md \
|
||||
https://raw.githubusercontent.com/docker/distribution/${DISTRIB_BRANCH}/docs/storagedrivers.md \
|
||||
https://raw.githubusercontent.com/docker/distribution/${DISTRIB_BRANCH}/docs/notifications.md \
|
||||
/docs/sources/registry/
|
||||
|
||||
ADD https://raw.githubusercontent.com/docker/distribution/${DISTRIB_BRANCH}/docs/spec/api.md \
|
||||
https://raw.githubusercontent.com/docker/distribution/${DISTRIB_BRANCH}/docs/spec/json.md \
|
||||
/docs/sources/registry/spec/
|
||||
|
||||
ADD https://raw.githubusercontent.com/docker/distribution/${DISTRIB_BRANCH}/docs/storage-drivers/s3.md \
|
||||
https://raw.githubusercontent.com/docker/distribution/${DISTRIB_BRANCH}/docs/storage-drivers/azure.md \
|
||||
https://raw.githubusercontent.com/docker/distribution/${DISTRIB_BRANCH}/docs/storage-drivers/filesystem.md \
|
||||
https://raw.githubusercontent.com/docker/distribution/${DISTRIB_BRANCH}/docs/storage-drivers/inmemory.md \
|
||||
/docs/sources/registry/storage-drivers/
|
||||
|
||||
ADD https://raw.githubusercontent.com/docker/distribution/${DISTRIB_BRANCH}/docs/spec/auth/token.md /docs/sources/registry/spec/auth/token.md
|
||||
|
||||
RUN sed -i.old '1s;^;no_version_dropdown: true;' \
|
||||
/docs/sources/registry/*.md \
|
||||
/docs/sources/registry/spec/*.md \
|
||||
/docs/sources/registry/spec/auth/*.md \
|
||||
/docs/sources/registry/storage-drivers/*.md
|
||||
|
||||
RUN sed -i.old -e '/^<!--GITHUB/g' -e '/^IGNORES-->/g'\
|
||||
/docs/sources/registry/*.md \
|
||||
/docs/sources/registry/spec/*.md \
|
||||
/docs/sources/registry/spec/auth/*.md \
|
||||
/docs/sources/registry/storage-drivers/*.md
|
||||
|
||||
#######################
|
||||
# Docker Swarm
|
||||
#######################
|
||||
|
||||
#ADD https://raw.githubusercontent.com/docker/swarm/${SWARM_BRANCH}/docs/mkdocs.yml /docs/mkdocs-swarm.yml
|
||||
ADD https://raw.githubusercontent.com/docker/swarm/${SWARM_BRANCH}/docs/index.md /docs/sources/swarm/index.md
|
||||
|
||||
ADD https://raw.githubusercontent.com/docker/swarm/${SWARM_BRANCH}/discovery/README.md /docs/sources/swarm/discovery.md
|
||||
|
||||
ADD https://raw.githubusercontent.com/docker/swarm/${SWARM_BRANCH}/api/README.md /docs/sources/swarm/API.md
|
||||
|
||||
ADD https://raw.githubusercontent.com/docker/swarm/${SWARM_BRANCH}/scheduler/filter/README.md /docs/sources/swarm/scheduler/filter.md
|
||||
|
||||
ADD https://raw.githubusercontent.com/docker/swarm/${SWARM_BRANCH}/scheduler/strategy/README.md /docs/sources/swarm/scheduler/strategy.md
|
||||
|
||||
RUN sed -i.old '1s;^;no_version_dropdown: true;' /docs/sources/swarm/*.md /docs/sources/swarm/scheduler/*.md
|
||||
|
||||
#######################
|
||||
# Docker Machine
|
||||
#######################
|
||||
#ADD https://raw.githubusercontent.com/docker/machine/${MACHINE_BRANCH}/docs/mkdocs.yml /docs/mkdocs-machine.yml
|
||||
|
||||
ADD https://raw.githubusercontent.com/docker/machine/${MACHINE_BRANCH}/docs/index.md /docs/sources/machine/index.md
|
||||
RUN sed -i.old '1s;^;no_version_dropdown: true;' /docs/sources/machine/index.md
|
||||
|
||||
#######################
|
||||
# Docker Compose
|
||||
#######################
|
||||
|
||||
#ADD https://raw.githubusercontent.com/docker/compose/${COMPOSE_BRANCH}/docs/mkdocs.yml /docs/mkdocs-compose.yml
|
||||
|
||||
ADD https://raw.githubusercontent.com/docker/compose/${COMPOSE_BRANCH}/docs/index.md \
|
||||
https://raw.githubusercontent.com/docker/compose/${COMPOSE_BRANCH}/docs/install.md \
|
||||
https://raw.githubusercontent.com/docker/compose/${COMPOSE_BRANCH}/docs/cli.md \
|
||||
https://raw.githubusercontent.com/docker/compose/${COMPOSE_BRANCH}/docs/yml.md \
|
||||
https://raw.githubusercontent.com/docker/compose/${COMPOSE_BRANCH}/docs/env.md \
|
||||
https://raw.githubusercontent.com/docker/compose/${COMPOSE_BRANCH}/docs/completion.md \
|
||||
https://raw.githubusercontent.com/docker/compose/${COMPOSE_BRANCH}/docs/django.md \
|
||||
https://raw.githubusercontent.com/docker/compose/${COMPOSE_BRANCH}/docs/rails.md \
|
||||
https://raw.githubusercontent.com/docker/compose/${COMPOSE_BRANCH}/docs/wordpress.md \
|
||||
https://raw.githubusercontent.com/docker/compose/${COMPOSE_BRANCH}/docs/extends.md \
|
||||
https://raw.githubusercontent.com/docker/compose/${COMPOSE_BRANCH}/docs/production.md \
|
||||
/docs/sources/compose/
|
||||
|
||||
RUN sed -i.old '1s;^;no_version_dropdown: true;' /docs/sources/compose/*.md
|
||||
|
||||
#######################
|
||||
# Kitematic
|
||||
#######################
|
||||
ADD https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/faq.md \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/index.md \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/known-issues.md \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/minecraft-server.md \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/nginx-web-server.md \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/rethinkdb-dev-database.md \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/userguide.md \
|
||||
/docs/sources/kitematic/
|
||||
RUN sed -i.old '1s;^;no_version_dropdown: true;' /docs/sources/kitematic/*.md
|
||||
ADD https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/browse-images.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/change-folder.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/cli-access-button.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/cli-redis-container.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/cli-terminal.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/containers.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/installing.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/minecraft-add-server.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/minecraft-create.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/minecraft-data-volume.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/minecraft-login.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/minecraft-map.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/minecraft-port.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/minecraft-restart.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/minecraft-server-address.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/nginx-2048-files.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/nginx-2048.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/nginx-create.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/nginx-data-folder.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/nginx-data-volume.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/nginx-hello-world.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/nginx-preview.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/nginx-serving-2048.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/rethink-container.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/rethink-create.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/rethink-ports.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/rethinkdb-preview.png \
|
||||
https://raw.githubusercontent.com/kitematic/kitematic/${KITEMATIC_BRANCH}/docs/assets/volumes-dir.png \
|
||||
/docs/sources/kitematic/assets/
|
||||
|
||||
# Then build everything together, ready for mkdocs
|
||||
RUN /docs/build.sh
|
||||
WORKDIR /docs
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
.PHONY: all binary build cross default docs docs-build docs-shell shell test test-unit test-integration test-integration-cli test-docker-py validate
|
||||
|
||||
# env vars passed through directly to Docker's build scripts
|
||||
# to allow things like `make DOCKER_CLIENTONLY=1 binary` easily
|
||||
# `docs/sources/contributing/devenvironment.md ` and `project/PACKAGERS.md` have some limited documentation of some of these
|
||||
DOCKER_ENVS := \
|
||||
-e BUILDFLAGS \
|
||||
-e DOCKER_CLIENTONLY \
|
||||
-e DOCKER_EXECDRIVER \
|
||||
-e DOCKER_GRAPHDRIVER \
|
||||
-e TESTDIRS \
|
||||
-e TESTFLAGS \
|
||||
-e TIMEOUT
|
||||
# note: we _cannot_ add "-e DOCKER_BUILDTAGS" here because even if it's unset in the shell, that would shadow the "ENV DOCKER_BUILDTAGS" set in our Dockerfile, which is very important for our official builds
|
||||
|
||||
# to allow `make DOCSDIR=docs docs-shell` (to create a bind mount in docs)
|
||||
DOCS_MOUNT := $(if $(DOCSDIR),-v $(CURDIR)/$(DOCSDIR):/$(DOCSDIR))
|
||||
|
||||
# to allow `make DOCSPORT=9000 docs`
|
||||
DOCSPORT := 8000
|
||||
|
||||
# Get the IP ADDRESS
|
||||
DOCKER_IP=$(shell python -c "import urlparse ; print urlparse.urlparse('$(DOCKER_HOST)').hostname or ''")
|
||||
HUGO_BASE_URL=$(shell test -z "$(DOCKER_IP)" && echo localhost || echo "$(DOCKER_IP)")
|
||||
HUGO_BIND_IP=0.0.0.0
|
||||
|
||||
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
||||
DOCKER_IMAGE := docker$(if $(GIT_BRANCH),:$(GIT_BRANCH))
|
||||
DOCKER_DOCS_IMAGE := docs-base$(if $(GIT_BRANCH),:$(GIT_BRANCH))
|
||||
|
||||
|
||||
DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e AWS_S3_BUCKET -e NOCACHE
|
||||
|
||||
# for some docs workarounds (see below in "docs-build" target)
|
||||
GITCOMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
|
||||
|
||||
default: docs
|
||||
|
||||
docs: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" hugo server --port=$(DOCSPORT) --baseUrl=$(HUGO_BASE_URL) --bind=$(HUGO_BIND_IP)
|
||||
|
||||
docs-draft: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" hugo server --buildDrafts="true" --port=$(DOCSPORT) --baseUrl=$(HUGO_BASE_URL) --bind=$(HUGO_BIND_IP)
|
||||
|
||||
|
||||
docs-shell: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" bash
|
||||
|
||||
|
||||
docs-build:
|
||||
# ( git remote | grep -v upstream ) || git diff --name-status upstream/release..upstream/docs ./ > ./changed-files
|
||||
# echo "$(GIT_BRANCH)" > GIT_BRANCH
|
||||
# echo "$(AWS_S3_BUCKET)" > AWS_S3_BUCKET
|
||||
# echo "$(GITCOMMIT)" > GITCOMMIT
|
||||
docker build -t "$(DOCKER_DOCS_IMAGE)" .
|
||||
@@ -1,6 +1,12 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
draft = true
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Docker Documentation
|
||||
|
||||
The source for Docker documentation is in this directory under `sources/`. Our
|
||||
The source for Docker documentation is in this directory. Our
|
||||
documentation uses extended Markdown, as implemented by
|
||||
[MkDocs](http://mkdocs.org). The current release of the Docker documentation
|
||||
resides on [https://docs.docker.com](https://docs.docker.com).
|
||||
@@ -54,7 +60,7 @@ own.
|
||||
release. It also allows docs maintainers to easily cherry-pick your changes
|
||||
into the `docs` release branch.
|
||||
|
||||
4. Modify existing or add new `.md` files to the `docs/sources` directory.
|
||||
4. Modify existing or add new `.md` files to the `docs` directory.
|
||||
|
||||
If you add a new document (`.md`) file, you must also add it to the
|
||||
appropriate section of the `docs/mkdocs.yml` file in this repository.
|
||||
@@ -107,7 +113,7 @@ links that are referenced in the documentation—there should be none.
|
||||
## Style guide
|
||||
|
||||
If you have questions about how to write for Docker's documentation, please see
|
||||
the [style guide](sources/project/doc-style.md). The style guide provides
|
||||
the [style guide](project/doc-style.md). The style guide provides
|
||||
guidance about grammar, syntax, formatting, styling, language, or tone. If
|
||||
something isn't clear in the guide, please submit an issue to let us know or
|
||||
submit a pull request to help us improve it.
|
||||
|
||||
|
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 183 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 175 KiB After Width: | Height: | Size: 175 KiB |
@@ -1,6 +1,13 @@
|
||||
page_title: Link via an ambassador container
|
||||
page_description: Using the Ambassador pattern to abstract (network) services
|
||||
page_keywords: Examples, Usage, links, docker, documentation, examples, names, name, container naming
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Link via an ambassador container"
|
||||
description = "Using the Ambassador pattern to abstract (network) services"
|
||||
keywords = ["Examples, Usage, links, docker, documentation, examples, names, name, container naming"]
|
||||
[menu.main]
|
||||
parent = "smn_administrate"
|
||||
weight = 6
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Link via an ambassador container
|
||||
|
||||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
@@ -1,6 +1,12 @@
|
||||
page_title: Resizing a Boot2Docker volume
|
||||
page_description: Resizing a Boot2Docker volume in VirtualBox with GParted
|
||||
page_keywords: boot2docker, volume, virtualbox
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Resizing a Boot2Docker volume "
|
||||
description = "Resizing a Boot2Docker volume in VirtualBox with GParted"
|
||||
keywords = ["boot2docker, volume, virtualbox"]
|
||||
[menu.main]
|
||||
parent = "smn_win_osx"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Getting “no space left on device” errors with Boot2Docker?
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
page_title: Create a base image
|
||||
page_description: How to create base images
|
||||
page_keywords: Examples, Usage, base image, docker, documentation, examples
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Create a base image"
|
||||
description = "How to create base images"
|
||||
keywords = ["Examples, Usage, base image, docker, documentation, examples"]
|
||||
[menu.main]
|
||||
parent = "smn_images"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Create a base image
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
page_title: First steps with Docker
|
||||
page_description: Common usage and commands
|
||||
page_keywords: Examples, Usage, basic commands, docker, documentation, examples
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Get started with containers"
|
||||
description = "Common usage and commands"
|
||||
keywords = ["Examples, Usage, basic commands, docker, documentation, examples"]
|
||||
[menu.main]
|
||||
parent = "smn_containers"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# First steps with Docker
|
||||
# "Get started with containers
|
||||
|
||||
This guide assumes you have a working installation of Docker. To check
|
||||
your Docker install, run the following command:
|
||||
@@ -41,7 +47,9 @@ image cache.
|
||||
> characters of the full image ID - which can be found using
|
||||
> `docker inspect` or `docker images --no-trunc=true`
|
||||
|
||||
{{ include "no-remote-sudo.md" }}
|
||||
> **Note:** if you are using a remote Docker daemon, such as Boot2Docker,
|
||||
> then _do not_ type the `sudo` before the `docker` commands shown in the
|
||||
> documentation's examples.
|
||||
|
||||
## Running an interactive shell
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
page_title: Using certificates for repository client verification
|
||||
page_description: How to set up and use certificates with a registry to verify access
|
||||
page_keywords: Usage, registry, repository, client, root, certificate, docker, apache, ssl, tls, documentation, examples, articles, tutorials
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Using certificates for repository client verification"
|
||||
description = "How to set up and use certificates with a registry to verify access"
|
||||
keywords = ["Usage, registry, repository, client, root, certificate, docker, apache, ssl, tls, documentation, examples, articles, tutorials"]
|
||||
[menu.main]
|
||||
parent = "mn_docker_hub"
|
||||
weight = 7
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Using certificates for repository client verification
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
page_title: Process management with CFEngine
|
||||
page_description: Managing containerized processes with CFEngine
|
||||
page_keywords: cfengine, process, management, usage, docker, documentation
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Process management with CFEngine"
|
||||
description = "Managing containerized processes with CFEngine"
|
||||
keywords = ["cfengine, process, management, usage, docker, documentation"]
|
||||
[menu.main]
|
||||
parent = "smn_third_party"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Process management with CFEngine
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
page_title: Using Chef
|
||||
page_description: Installation and using Docker via Chef
|
||||
page_keywords: chef, installation, usage, docker, documentation
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Using Chef"
|
||||
description = "Installation and using Docker via Chef"
|
||||
keywords = ["chef, installation, usage, docker, documentation"]
|
||||
[menu.main]
|
||||
parent = "smn_third_party"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Using Chef
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
page_title: Configuring and running Docker
|
||||
page_description: Configuring and running the Docker daemon on various distributions
|
||||
page_keywords: docker, daemon, configuration, running, process managers
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Configuring and running Docker"
|
||||
description = "Configuring and running the Docker daemon on various distributions"
|
||||
keywords = ["docker, daemon, configuration, running, process managers"]
|
||||
[menu.main]
|
||||
parent = "smn_administrate"
|
||||
weight = 3
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Configuring and running Docker on various distributions
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
page_title: Best practices for writing Dockerfiles
|
||||
page_description: Hints, tips and guidelines for writing clean, reliable Dockerfiles
|
||||
page_keywords: Examples, Usage, base image, docker, documentation, dockerfile, best practices, hub, official repo
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Best practices for writing Dockerfiles"
|
||||
description = "Hints, tips and guidelines for writing clean, reliable Dockerfiles"
|
||||
keywords = ["Examples, Usage, base image, docker, documentation, dockerfile, best practices, hub, official repo"]
|
||||
[menu.main]
|
||||
parent = "smn_images"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Best practices for writing Dockerfiles
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
page_title: PowerShell DSC Usage
|
||||
page_description: Using DSC to configure a new Docker host
|
||||
page_keywords: powershell, dsc, installation, usage, docker, documentation
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "PowerShell DSC Usage"
|
||||
description = "Using DSC to configure a new Docker host"
|
||||
keywords = ["powershell, dsc, installation, usage, docker, documentation"]
|
||||
[menu.main]
|
||||
parent = "smn_win_osx"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Using PowerShell DSC
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
page_title: Automatically start containers
|
||||
page_description: How to generate scripts for upstart, systemd, etc.
|
||||
page_keywords: systemd, upstart, supervisor, docker, documentation, host integration
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Automatically start containers"
|
||||
description = "How to generate scripts for upstart, systemd, etc."
|
||||
keywords = ["systemd, upstart, supervisor, docker, documentation, host integration"]
|
||||
[menu.main]
|
||||
parent = "smn_containers"
|
||||
weight = 99
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Automatically start containers
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
page_title: Protecting the Docker daemon socket with HTTPS
|
||||
page_description: How to setup and run Docker with HTTPS
|
||||
page_keywords: docker, docs, article, example, https, daemon, tls, ca, certificate
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Protect the Docker daemon socket"
|
||||
description = "How to setup and run Docker with HTTPS"
|
||||
keywords = ["docker, docs, article, example, https, daemon, tls, ca, certificate"]
|
||||
[menu.main]
|
||||
parent = "smn_administrate"
|
||||
weight = 5
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Protecting the Docker daemon socket with HTTPS
|
||||
# Protect the Docker daemon socket
|
||||
|
||||
By default, Docker runs via a non-networked Unix socket. It can also
|
||||
optionally communicate using a HTTP socket.
|
||||
@@ -9,7 +9,7 @@ so my process is
|
||||
|
||||
$ boot2docker ssh
|
||||
$$ git clone https://github.com/docker/docker
|
||||
$$ cd docker/docs/sources/articles/https
|
||||
$$ cd docker/docs/articles/https
|
||||
$$ make cert
|
||||
lots of things to see and manually answer, as openssl wants to be interactive
|
||||
**NOTE:** make sure you enter the hostname (`boot2docker` in my case) when prompted for `Computer Name`)
|
||||
@@ -18,7 +18,7 @@ $$ sudo make run
|
||||
start another terminal
|
||||
|
||||
$ boot2docker ssh
|
||||
$$ cd docker/docs/sources/articles/https
|
||||
$$ cd docker/docs/articles/https
|
||||
$$ make client
|
||||
|
||||
the last will connect first with `--tls` and then with `--tlsverify`
|
||||
@@ -1,10 +1,16 @@
|
||||
page_title: Network configuration
|
||||
page_description: Docker networking
|
||||
page_keywords: network, networking, bridge, docker, documentation
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Network configuration"
|
||||
description = "Docker networking"
|
||||
keywords = ["network, networking, bridge, docker, documentation"]
|
||||
[menu.main]
|
||||
parent= "smn_administrate"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Network configuration
|
||||
|
||||
## TL;DR
|
||||
## Summary
|
||||
|
||||
When Docker starts, it creates a virtual interface named `docker0` on
|
||||
the host machine. It randomly chooses an address and subnet from the
|
||||
@@ -1,6 +1,12 @@
|
||||
page_title: Using Puppet
|
||||
page_description: Installing and using Puppet
|
||||
page_keywords: puppet, installation, usage, docker, documentation
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Using Puppet"
|
||||
description = "Installing and using Puppet"
|
||||
keywords = ["puppet, installation, usage, docker, documentation"]
|
||||
[menu.main]
|
||||
parent = "smn_third_party"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Using Puppet
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
page_title: Run a local registry mirror
|
||||
page_description: How to set up and run a local registry mirror
|
||||
page_keywords: docker, registry, mirror, examples
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Run a local registry mirror"
|
||||
description = "How to set up and run a local registry mirror"
|
||||
keywords = ["docker, registry, mirror, examples"]
|
||||
[menu.main]
|
||||
parent = "mn_docker_hub"
|
||||
weight = 8
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Run a local registry mirror
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
page_title: Runtime metrics
|
||||
page_description: Measure the behavior of running containers
|
||||
page_keywords: docker, metrics, CPU, memory, disk, IO, run, runtime
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Runtime metrics"
|
||||
description = "Measure the behavior of running containers"
|
||||
keywords = ["docker, metrics, CPU, memory, disk, IO, run, runtime"]
|
||||
[menu.main]
|
||||
parent = "smn_administrate"
|
||||
weight = 4
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Runtime metrics
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
page_title: Docker security
|
||||
page_description: Review of the Docker Daemon attack surface
|
||||
page_keywords: Docker, Docker documentation, security
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Docker security"
|
||||
description = "Review of the Docker Daemon attack surface"
|
||||
keywords = ["Docker, Docker documentation, security"]
|
||||
[menu.main]
|
||||
parent = "smn_administrate"
|
||||
weight = 2
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Docker security
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
page_title: Controlling and configuring Docker using systemd
|
||||
page_description: Controlling and configuring Docker using systemd
|
||||
page_keywords: docker, daemon, systemd, configuration
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Control and configure Docker with systemd"
|
||||
description = "Controlling and configuring Docker using systemd"
|
||||
keywords = ["docker, daemon, systemd, configuration"]
|
||||
[menu.main]
|
||||
parent = "smn_administrate"
|
||||
weight = 7
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Controlling and configuring Docker using systemd
|
||||
# Control and configure Docker with systemd
|
||||
|
||||
Many Linux distributions use systemd to start the Docker daemon. This document
|
||||
shows a few examples of how to customise Docker's settings.
|
||||
@@ -1,6 +1,12 @@
|
||||
page_title: Using Supervisor with Docker
|
||||
page_description: How to use Supervisor process management with Docker
|
||||
page_keywords: docker, supervisor, process management
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Using Supervisor with Docker"
|
||||
description = "How to use Supervisor process management with Docker"
|
||||
keywords = ["docker, supervisor, process management"]
|
||||
[menu.main]
|
||||
parent = "smn_third_party"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Using Supervisor with Docker
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
page_title: Accounts on Docker Hub
|
||||
page_description: Docker Hub accounts
|
||||
page_keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Accounts on Docker Hub"
|
||||
description = "Docker Hub accounts"
|
||||
keywords = ["Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation"]
|
||||
[menu.main]
|
||||
parent = "smn_pubhub"
|
||||
weight = 1
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Accounts on Docker Hub
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
page_title: Automated Builds on Docker Hub
|
||||
page_description: Docker Hub Automated Builds
|
||||
page_keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation, trusted, builds, trusted builds, automated builds
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Automated Builds on Docker Hub"
|
||||
description = "Docker Hub Automated Builds"
|
||||
keywords = ["Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation, trusted, builds, trusted builds, automated builds"]
|
||||
[menu.main]
|
||||
parent = "smn_pubhub"
|
||||
weight = 3
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Automated Builds on Docker Hub
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
page_title: The Docker Hub Registry help
|
||||
page_description: The Docker Registry help documentation home
|
||||
page_keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation
|
||||
<!--[metadata]>
|
||||
+++
|
||||
draft = true
|
||||
title = "The Docker Hub Registry help"
|
||||
description = "The Docker Registry help documentation home"
|
||||
keywords = ["Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation"]
|
||||
[menu.main]
|
||||
parent = "smn_pubhub"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# The Docker Hub Registry help
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |