Source repo for Docker's Documentation
Go to file
Daniel Hiltgen dde577d154 Add token pass-thru for Authconfig
This augments the CreateContainer call to detect the AuthConfig header
and use any supplied auth for pull operations.  This will allow pulling
of protected image on to specific node during the create operation.

CLI usage example using username/password:

    # Calculate the header
    REPO_USER=yourusername
    read -s PASSWORD
    HEADER=$(echo "{\"username\":\"${REPO_USER}\",\"password\":\"${PASSWORD}\"}"|base64 -w 0 )
    unset PASSWORD
    echo HEADER=$HEADER

    # Then add the following to your ~/.docker/config.json
    "HttpHeaders": {
        "X-Registry-Auth": "<HEADER string from above>"
    }

    # Now run a private image against swarm:
    docker run --rm -it yourprivateimage:latest

CLI usage example using registry tokens: (Required engine 1.10 with new auth token support)

    REPO=yourrepo/yourimage
    REPO_USER=yourusername
    read -s PASSWORD
    AUTH_URL=https://auth.docker.io/token
    TOKEN=$(curl -s -u "${REPO_USER}:${PASSWORD}" "${AUTH_URL}?scope=repository:${REPO}:pull&service=registry.docker.io" |
        jq -r ".token")
    HEADER=$(echo "{\"registrytoken\":\"${TOKEN}\"}"|base64 -w 0 )
    echo HEADER=$HEADER

    # Update the docker config as above, but the token will expire quickly...

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2015-12-11 18:36:55 -08:00
Godeps Vendor bump of dockerclient 2015-12-11 18:36:55 -08:00
api Add token pass-thru for Authconfig 2015-12-11 18:36:55 -08:00
cli Increase default TTL and heartbeat value 2015-12-04 17:11:33 -08:00
cluster Add token pass-thru for Authconfig 2015-12-11 18:36:55 -08:00
discovery Fix broken links in discovery README 2015-12-07 00:43:17 +01:00
docs Add token pass-thru for Authconfig 2015-12-11 18:36:55 -08:00
leadership add support for specifying the leader election lock ttl 2015-09-23 04:06:35 -07:00
scheduler Add filter by image name support to /images/json 2015-10-27 11:00:37 -04:00
script Update for new nsqio image 2015-10-30 17:19:06 +00:00
test Merge pull request #1449 from jimenez/mesos_user_abnormal_error 2015-12-07 13:43:34 -08:00
version Bump version to 1.0.0 2015-10-13 17:40:00 -07:00
.gitignore fix gitignore to specifically ignore the binary called swarm in the root directory 2015-09-01 15:19:38 -07:00
.godir update .godir 2014-11-18 21:47:00 +00:00
.travis.yml switch to go1.5.1 2015-10-26 11:49:48 -07:00
CHANGELOG.md Bump version to 1.0.0 2015-10-13 17:40:00 -07:00
CONTRIBUTING.md fix 'go test' invocation 2015-08-26 12:33:48 -07:00
Dockerfile switch to go1.5.1 2015-10-26 11:49:48 -07:00
LICENSE use tcp:// in doc and update copyrights 2015-01-12 22:58:03 +00:00
MAINTAINERS Add @mhbauer to maintainers 2015-12-07 11:14:52 -08:00
README.md remove section readme 2015-10-14 15:27:17 -07:00
ROADMAP.md Small spelling and capitalisation fixes 2015-05-27 15:22:36 +01:00
logo.png update swarm logo 2015-10-14 15:22:46 -07:00
main.go Change existing discovery backends to 'kv' using metatada storage backends in the store package 2015-05-11 17:23:55 -07:00

README.md

Swarm: a Docker-native clustering system

GoDoc Jenkins Build Status Build Status Coverage Status

Docker Swarm Logo

Docker Swarm is native clustering for Docker. It turns a pool of Docker hosts into a single, virtual host.

Swarm serves the standard Docker API, so any tool which already communicates with a Docker daemon can use Swarm to transparently scale to multiple hosts: Dokku, Compose, Krane, Flynn, Deis, DockerUI, Shipyard, Drone, Jenkins... and, of course, the Docker client itself.

Like other Docker projects, Swarm follows the "batteries included but removable" principle. It ships with a set of simple scheduling backends out of the box, and as initial development settles, an API will be developed to enable pluggable backends. The goal is to provide a smooth out-of-the-box experience for simple use cases, and allow swapping in more powerful backends, like Mesos, for large scale production deployments.

Installation for Swarm Users

For installing swarm for using in your environment, use the Docker Swarm documentation on docs.docker.com.

Installation for Swarm Developers

Developers should always download and install from source rather than using the Docker image.

Prerequisites

  1. Beginning with Swarm 0.4 golang 1.4.x or later is required for building Swarm. Refer to the Go installation page to download and install the golang 1.4.x or later package.

Note: On Ubuntu 14.04, the apt-get repositories install golang 1.2.1 version by default. So, do not use apt-get but install golang 1.4.x manually using the instructions provided on the Go site.

  1. Install Git.

  2. Install godep.

Clone and build Swarm

Note GOPATH should be set when install godep in above step.

Install the swarm binary in the $GOPATH/bin directory. An easy way to do this is using the go get command.

$ go get github.com/docker/swarm

You can also do this manually using the following commands:

$ mkdir -p $GOPATH/src/github.com/docker/
$ cd $GOPATH/src/github.com/docker/
$ git clone https://github.com/docker/swarm
$ cd swarm
$ $GOPATH/bin/godep go install .

Then you can find the swarm binary under $GOPATH/bin.

From here, you can follow the instructions in the main documentation, replacing docker run swarm with just swarm.

Participating

You can contribute to Docker Swarm in several different ways:

  • If you have comments, questions, or want to use your knowledge to help others, come join the conversation on IRC. You can reach us at #docker-swarm on Freenode.

  • To report a problem or request a feature, please file an issue.

  • Of course, we welcome pull requests and patches. For information on making feature requests, follow the process suggested here.

Finally, if you want to see what we have for the future and learn more about our release cycles, all this information is detailed on the wiki

Code and documentation copyright 2014-2015 Docker, inc. Code released under the Apache 2.0 license.

Docs released under Creative commons.