rebase
24
Dockerfile
|
@ -20,39 +20,49 @@
|
||||||
# -e AWS_ACCESS_KEY=foo \
|
# -e AWS_ACCESS_KEY=foo \
|
||||||
# -e AWS_SECRET_KEY=bar \
|
# -e AWS_SECRET_KEY=bar \
|
||||||
# -e GPG_PASSPHRASE=gloubiboulga \
|
# -e GPG_PASSPHRASE=gloubiboulga \
|
||||||
# -lxc-conf=lxc.aa_profile=unconfined -privileged docker hack/release.sh
|
# docker hack/release.sh
|
||||||
#
|
#
|
||||||
|
|
||||||
docker-version 0.6.1
|
docker-version 0.6.1
|
||||||
from ubuntu:12.04
|
from ubuntu:12.04
|
||||||
maintainer Solomon Hykes <solomon@dotcloud.com>
|
maintainer Solomon Hykes <solomon@dotcloud.com>
|
||||||
|
|
||||||
# Build dependencies
|
# Build dependencies
|
||||||
run echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list
|
run echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list
|
||||||
run apt-get update
|
run apt-get update
|
||||||
run apt-get install -y -q curl
|
run apt-get install -y -q curl
|
||||||
run apt-get install -y -q git
|
run apt-get install -y -q git
|
||||||
run apt-get install -y -q mercurial
|
run apt-get install -y -q mercurial
|
||||||
# Install Go
|
run apt-get install -y -q build-essential
|
||||||
run curl -s https://go.googlecode.com/files/go1.1.2.linux-amd64.tar.gz | tar -v -C /usr/local -xz
|
|
||||||
env PATH /usr/local/go/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
|
# Install Go from source (for eventual cross-compiling)
|
||||||
env GOPATH /go:/go/src/github.com/dotcloud/docker/vendor
|
|
||||||
env CGO_ENABLED 0
|
env CGO_ENABLED 0
|
||||||
run cd /tmp && echo 'package main' > t.go && go test -a -i -v
|
run curl -s https://go.googlecode.com/files/go1.1.2.src.tar.gz | tar -v -C / -xz && mv /go /goroot
|
||||||
|
run cd /goroot/src && ./make.bash
|
||||||
|
env GOROOT /goroot
|
||||||
|
env PATH $PATH:/goroot/bin
|
||||||
|
env GOPATH /go:/go/src/github.com/dotcloud/docker/vendor
|
||||||
|
|
||||||
# Ubuntu stuff
|
# Ubuntu stuff
|
||||||
run apt-get install -y -q ruby1.9.3 rubygems libffi-dev
|
run apt-get install -y -q ruby1.9.3 rubygems libffi-dev
|
||||||
run gem install fpm
|
run gem install --no-rdoc --no-ri fpm
|
||||||
run apt-get install -y -q reprepro dpkg-sig
|
run apt-get install -y -q reprepro dpkg-sig
|
||||||
|
|
||||||
# Install s3cmd 1.0.1 (earlier versions don't support env variables in the config)
|
# Install s3cmd 1.0.1 (earlier versions don't support env variables in the config)
|
||||||
run apt-get install -y -q python-pip
|
run apt-get install -y -q python-pip
|
||||||
run pip install s3cmd
|
run pip install s3cmd
|
||||||
run pip install python-magic
|
run pip install python-magic
|
||||||
run /bin/echo -e '[default]\naccess_key=$AWS_ACCESS_KEY\nsecret_key=$AWS_SECRET_KEY\n' > /.s3cfg
|
run /bin/echo -e '[default]\naccess_key=$AWS_ACCESS_KEY\nsecret_key=$AWS_SECRET_KEY\n' > /.s3cfg
|
||||||
|
|
||||||
# Runtime dependencies
|
# Runtime dependencies
|
||||||
run apt-get install -y -q iptables
|
run apt-get install -y -q iptables
|
||||||
run apt-get install -y -q lxc
|
run apt-get install -y -q lxc
|
||||||
|
|
||||||
volume /var/lib/docker
|
volume /var/lib/docker
|
||||||
workdir /go/src/github.com/dotcloud/docker
|
workdir /go/src/github.com/dotcloud/docker
|
||||||
|
|
||||||
# Wrap all commands in the "docker-in-docker" script to allow nested containers
|
# Wrap all commands in the "docker-in-docker" script to allow nested containers
|
||||||
entrypoint ["hack/dind"]
|
entrypoint ["hack/dind"]
|
||||||
|
|
||||||
# Upload docker source
|
# Upload docker source
|
||||||
add . /go/src/github.com/dotcloud/docker
|
add . /go/src/github.com/dotcloud/docker
|
||||||
|
|
42
NOTICE
|
@ -1,11 +1,43 @@
|
||||||
Docker
|
Docker
|
||||||
Copyright 2012-2013 dotCloud, inc.
|
Copyright 2012-2013 dotCloud, inc.
|
||||||
|
|
||||||
This product includes software developed at dotCloud, inc. (http://www.dotcloud.com).
|
This product includes software developed at dotCloud,
|
||||||
|
inc. (http://www.dotcloud.com).
|
||||||
|
|
||||||
This product contains software (https://github.com/kr/pty) developed by Keith Rarick, licensed under the MIT License.
|
This product contains software (https://github.com/kr/pty) developed
|
||||||
|
by Keith Rarick, licensed under the MIT License.
|
||||||
|
|
||||||
Transfers of Docker shall be in accordance with applicable export controls of any country and all other applicable
|
The following is courtesy of our legal counsel:
|
||||||
legal requirements. Docker shall not be distributed or downloaded to or in Cuba, Iran, North Korea, Sudan or Syria
|
|
||||||
and shall not be distributed or downloaded to any person on the Denied Persons List administered by the U.S.
|
Transfers of Docker shall be in accordance with applicable export
|
||||||
|
controls of any country and all other applicable legal requirements.
|
||||||
|
Docker shall not be distributed or downloaded to or in Cuba, Iran,
|
||||||
|
North Korea, Sudan or Syria and shall not be distributed or downloaded
|
||||||
|
to any person on the Denied Persons List administered by the U.S.
|
||||||
Department of Commerce.
|
Department of Commerce.
|
||||||
|
|
||||||
|
What does that mean?
|
||||||
|
Here is a further explanation from our legal counsel:
|
||||||
|
|
||||||
|
Like all software products that utilize cryptography, the export and
|
||||||
|
use of Docker is subject to the U.S. Commerce Department's Export
|
||||||
|
Administration Regulations (EAR) because it uses or contains
|
||||||
|
cryptography (see
|
||||||
|
http://www.bis.doc.gov/index.php/policy-guidance/encryption). Certain
|
||||||
|
free and open source software projects have a lightweight set of
|
||||||
|
requirements, which can generally be met by providing email notice to
|
||||||
|
the appropriate U.S. government agencies that their source code is
|
||||||
|
available on a publicly available repository and making the
|
||||||
|
appropriate statements in the README.
|
||||||
|
|
||||||
|
The restrictions of the EAR apply to certain denied locations
|
||||||
|
(currently Iran, Sudan, Syria, North Korea, or Cuba) and those
|
||||||
|
individuals on the Denied Persons List, which is available here:
|
||||||
|
http://www.bis.doc.gov/index.php/policy-guidance/lists-of-parties-of-concern/denied-persons-list.
|
||||||
|
If you are incorporating Docker into a new open source project, the
|
||||||
|
EAR restrictions apply to your incorporation of Docker into your
|
||||||
|
project in the same manner as other cryptography-enabled projects,
|
||||||
|
such as OpenSSL, almost all Linux distributions, etc.
|
||||||
|
|
||||||
|
For more information, see http://www.apache.org/dev/crypto.html and/or
|
||||||
|
seek legal counsel.
|
||||||
|
|
|
@ -190,6 +190,9 @@ wrong or incomplete.
|
||||||
|
|
||||||
### Legal
|
### Legal
|
||||||
|
|
||||||
|
*Brought to you courtesy of our legal counsel. For more context,
|
||||||
|
please see the Notice document.*
|
||||||
|
|
||||||
Transfers of Docker shall be in accordance with applicable export
|
Transfers of Docker shall be in accordance with applicable export
|
||||||
controls of any country and all other applicable legal requirements.
|
controls of any country and all other applicable legal requirements.
|
||||||
Docker shall not be distributed or downloaded to or in Cuba, Iran,
|
Docker shall not be distributed or downloaded to or in Cuba, Iran,
|
||||||
|
|
2
Vagrantfile
vendored
|
@ -13,6 +13,8 @@ Vagrant::Config.run do |config|
|
||||||
config.vm.box = BOX_NAME
|
config.vm.box = BOX_NAME
|
||||||
config.vm.box_url = BOX_URI
|
config.vm.box_url = BOX_URI
|
||||||
|
|
||||||
|
config.ssh.forward_agent = true
|
||||||
|
|
||||||
# Provision docker and new kernel if deployment was not done.
|
# Provision docker and new kernel if deployment was not done.
|
||||||
# It is assumed Vagrant can successfully launch the provider instance.
|
# It is assumed Vagrant can successfully launch the provider instance.
|
||||||
if Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty?
|
if Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty?
|
||||||
|
|
41
api.go
|
@ -21,10 +21,12 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APIVERSION = 1.5
|
const (
|
||||||
const DEFAULTHTTPHOST = "127.0.0.1"
|
APIVERSION = 1.6
|
||||||
const DEFAULTHTTPPORT = 4243
|
DEFAULTHTTPHOST = "127.0.0.1"
|
||||||
const DEFAULTUNIXSOCKET = "/var/run/docker.sock"
|
DEFAULTHTTPPORT = 4243
|
||||||
|
DEFAULTUNIXSOCKET = "/var/run/docker.sock"
|
||||||
|
)
|
||||||
|
|
||||||
type HttpApiFunc func(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error
|
type HttpApiFunc func(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error
|
||||||
|
|
||||||
|
@ -710,32 +712,43 @@ func postContainersAttach(srv *Server, version float64, w http.ResponseWriter, r
|
||||||
}
|
}
|
||||||
name := vars["name"]
|
name := vars["name"]
|
||||||
|
|
||||||
if _, err := srv.ContainerInspect(name); err != nil {
|
c, err := srv.ContainerInspect(name)
|
||||||
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
in, out, err := hijackServer(w)
|
inStream, outStream, err := hijackServer(w)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer func() {
|
defer func() {
|
||||||
if tcpc, ok := in.(*net.TCPConn); ok {
|
if tcpc, ok := inStream.(*net.TCPConn); ok {
|
||||||
tcpc.CloseWrite()
|
tcpc.CloseWrite()
|
||||||
} else {
|
} else {
|
||||||
in.Close()
|
inStream.Close()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
defer func() {
|
defer func() {
|
||||||
if tcpc, ok := out.(*net.TCPConn); ok {
|
if tcpc, ok := outStream.(*net.TCPConn); ok {
|
||||||
tcpc.CloseWrite()
|
tcpc.CloseWrite()
|
||||||
} else if closer, ok := out.(io.Closer); ok {
|
} else if closer, ok := outStream.(io.Closer); ok {
|
||||||
closer.Close()
|
closer.Close()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
fmt.Fprintf(out, "HTTP/1.1 200 OK\r\nContent-Type: application/vnd.docker.raw-stream\r\n\r\n")
|
var errStream io.Writer
|
||||||
if err := srv.ContainerAttach(name, logs, stream, stdin, stdout, stderr, in, out); err != nil {
|
|
||||||
fmt.Fprintf(out, "Error: %s\n", err)
|
fmt.Fprintf(outStream, "HTTP/1.1 200 OK\r\nContent-Type: application/vnd.docker.raw-stream\r\n\r\n")
|
||||||
|
|
||||||
|
if !c.Config.Tty && version >= 1.6 {
|
||||||
|
errStream = utils.NewStdWriter(outStream, utils.Stderr)
|
||||||
|
outStream = utils.NewStdWriter(outStream, utils.Stdout)
|
||||||
|
} else {
|
||||||
|
errStream = outStream
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := srv.ContainerAttach(name, logs, stream, stdin, stdout, stderr, inStream, outStream, errStream); err != nil {
|
||||||
|
fmt.Fprintf(outStream, "Error: %s\n", err)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -778,7 +791,7 @@ func wsContainersAttach(srv *Server, version float64, w http.ResponseWriter, r *
|
||||||
h := websocket.Handler(func(ws *websocket.Conn) {
|
h := websocket.Handler(func(ws *websocket.Conn) {
|
||||||
defer ws.Close()
|
defer ws.Close()
|
||||||
|
|
||||||
if err := srv.ContainerAttach(name, logs, stream, stdin, stdout, stderr, ws, ws); err != nil {
|
if err := srv.ContainerAttach(name, logs, stream, stdin, stdout, stderr, ws, ws, ws); err != nil {
|
||||||
utils.Debugf("Error: %s", err)
|
utils.Debugf("Error: %s", err)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
91
api_test.go
|
@ -959,7 +959,96 @@ func TestPostContainersAttach(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
setTimeout(t, "read/write assertion timed out", 2*time.Second, func() {
|
setTimeout(t, "read/write assertion timed out", 2*time.Second, func() {
|
||||||
if err := assertPipe("hello\n", "hello", stdout, stdinPipe, 15); err != nil {
|
if err := assertPipe("hello\n", string([]byte{1, 0, 0, 0, 0, 0, 0, 6})+"hello", stdout, stdinPipe, 15); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// Close pipes (client disconnects)
|
||||||
|
if err := closeWrap(stdin, stdinPipe, stdout, stdoutPipe); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wait for attach to finish, the client disconnected, therefore, Attach finished his job
|
||||||
|
setTimeout(t, "Waiting for CmdAttach timed out", 10*time.Second, func() {
|
||||||
|
<-c1
|
||||||
|
})
|
||||||
|
|
||||||
|
// We closed stdin, expect /bin/cat to still be running
|
||||||
|
// Wait a little bit to make sure container.monitor() did his thing
|
||||||
|
err = container.WaitTimeout(500 * time.Millisecond)
|
||||||
|
if err == nil || !container.State.Running {
|
||||||
|
t.Fatalf("/bin/cat is not running after closing stdin")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Try to avoid the timeout in destroy. Best effort, don't check error
|
||||||
|
cStdin, _ := container.StdinPipe()
|
||||||
|
cStdin.Close()
|
||||||
|
container.Wait()
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestPostContainersAttachStderr(t *testing.T) {
|
||||||
|
runtime := mkRuntime(t)
|
||||||
|
defer nuke(runtime)
|
||||||
|
|
||||||
|
srv := &Server{runtime: runtime}
|
||||||
|
|
||||||
|
container, err := runtime.Create(
|
||||||
|
&Config{
|
||||||
|
Image: GetTestImage(runtime).ID,
|
||||||
|
Cmd: []string{"/bin/sh", "-c", "/bin/cat >&2"},
|
||||||
|
OpenStdin: true,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
defer runtime.Destroy(container)
|
||||||
|
|
||||||
|
// Start the process
|
||||||
|
hostConfig := &HostConfig{}
|
||||||
|
if err := container.Start(hostConfig); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
stdin, stdinPipe := io.Pipe()
|
||||||
|
stdout, stdoutPipe := io.Pipe()
|
||||||
|
|
||||||
|
// Try to avoid the timeout in destroy. Best effort, don't check error
|
||||||
|
defer func() {
|
||||||
|
closeWrap(stdin, stdinPipe, stdout, stdoutPipe)
|
||||||
|
container.Kill()
|
||||||
|
}()
|
||||||
|
|
||||||
|
// Attach to it
|
||||||
|
c1 := make(chan struct{})
|
||||||
|
go func() {
|
||||||
|
defer close(c1)
|
||||||
|
|
||||||
|
r := &hijackTester{
|
||||||
|
ResponseRecorder: httptest.NewRecorder(),
|
||||||
|
in: stdin,
|
||||||
|
out: stdoutPipe,
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err := http.NewRequest("POST", "/containers/"+container.ID+"/attach?stream=1&stdin=1&stdout=1&stderr=1", bytes.NewReader([]byte{}))
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := postContainersAttach(srv, APIVERSION, r, req, map[string]string{"name": container.ID}); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
// Acknowledge hijack
|
||||||
|
setTimeout(t, "hijack acknowledge timed out", 2*time.Second, func() {
|
||||||
|
stdout.Read([]byte{})
|
||||||
|
stdout.Read(make([]byte, 4096))
|
||||||
|
})
|
||||||
|
|
||||||
|
setTimeout(t, "read/write assertion timed out", 2*time.Second, func() {
|
||||||
|
if err := assertPipe("hello\n", string([]byte{2, 0, 0, 0, 0, 0, 0, 6})+"hello", stdout, stdinPipe, 15); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -91,11 +91,17 @@ func LoadConfig(rootPath string) (*ConfigFile, error) {
|
||||||
}
|
}
|
||||||
authConfig := AuthConfig{}
|
authConfig := AuthConfig{}
|
||||||
origAuth := strings.Split(arr[0], " = ")
|
origAuth := strings.Split(arr[0], " = ")
|
||||||
|
if len(origAuth) != 2 {
|
||||||
|
return &configFile, fmt.Errorf("Invalid Auth config file")
|
||||||
|
}
|
||||||
authConfig.Username, authConfig.Password, err = decodeAuth(origAuth[1])
|
authConfig.Username, authConfig.Password, err = decodeAuth(origAuth[1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &configFile, err
|
return &configFile, err
|
||||||
}
|
}
|
||||||
origEmail := strings.Split(arr[1], " = ")
|
origEmail := strings.Split(arr[1], " = ")
|
||||||
|
if len(origEmail) != 2 {
|
||||||
|
return &configFile, fmt.Errorf("Invalid Auth config file")
|
||||||
|
}
|
||||||
authConfig.Email = origEmail[1]
|
authConfig.Email = origEmail[1]
|
||||||
authConfig.ServerAddress = IndexServerAddress()
|
authConfig.ServerAddress = IndexServerAddress()
|
||||||
configFile.Configs[IndexServerAddress()] = authConfig
|
configFile.Configs[IndexServerAddress()] = authConfig
|
||||||
|
|
41
commands.go
|
@ -1230,7 +1230,7 @@ func (cli *DockerCli) CmdLogs(args ...string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := cli.hijack("POST", "/containers/"+cmd.Arg(0)+"/attach?logs=1&stdout=1&stderr=1", false, nil, cli.out); err != nil {
|
if err := cli.hijack("POST", "/containers/"+cmd.Arg(0)+"/attach?logs=1&stdout=1&stderr=1", false, nil, cli.out, cli.err); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
@ -1273,7 +1273,7 @@ func (cli *DockerCli) CmdAttach(args ...string) error {
|
||||||
v.Set("stdout", "1")
|
v.Set("stdout", "1")
|
||||||
v.Set("stderr", "1")
|
v.Set("stderr", "1")
|
||||||
|
|
||||||
if err := cli.hijack("POST", "/containers/"+cmd.Arg(0)+"/attach?"+v.Encode(), container.Config.Tty, cli.in, cli.out); err != nil {
|
if err := cli.hijack("POST", "/containers/"+cmd.Arg(0)+"/attach?"+v.Encode(), container.Config.Tty, cli.in, cli.out, cli.err); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
@ -1433,6 +1433,9 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flRm := cmd.Lookup("rm")
|
||||||
|
autoRemove, _ := strconv.ParseBool(flRm.Value.String())
|
||||||
|
|
||||||
var containerIDFile *os.File
|
var containerIDFile *os.File
|
||||||
if len(hostConfig.ContainerIDFile) > 0 {
|
if len(hostConfig.ContainerIDFile) > 0 {
|
||||||
if _, err := ioutil.ReadFile(hostConfig.ContainerIDFile); err == nil {
|
if _, err := ioutil.ReadFile(hostConfig.ContainerIDFile); err == nil {
|
||||||
|
@ -1537,7 +1540,7 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
||||||
v := url.Values{}
|
v := url.Values{}
|
||||||
v.Set("logs", "1")
|
v.Set("logs", "1")
|
||||||
v.Set("stream", "1")
|
v.Set("stream", "1")
|
||||||
var out io.Writer
|
var out, stderr io.Writer
|
||||||
|
|
||||||
if config.AttachStdin {
|
if config.AttachStdin {
|
||||||
v.Set("stdin", "1")
|
v.Set("stdin", "1")
|
||||||
|
@ -1548,7 +1551,11 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
||||||
}
|
}
|
||||||
if config.AttachStderr {
|
if config.AttachStderr {
|
||||||
v.Set("stderr", "1")
|
v.Set("stderr", "1")
|
||||||
out = cli.out
|
if config.Tty {
|
||||||
|
stderr = cli.out
|
||||||
|
} else {
|
||||||
|
stderr = cli.err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
signals := make(chan os.Signal, 1)
|
signals := make(chan os.Signal, 1)
|
||||||
|
@ -1562,7 +1569,7 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if err := cli.hijack("POST", "/containers/"+runResult.ID+"/attach?"+v.Encode(), config.Tty, cli.in, out); err != nil {
|
if err := cli.hijack("POST", "/containers/"+runResult.ID+"/attach?"+v.Encode(), config.Tty, cli.in, out, stderr); err != nil {
|
||||||
utils.Debugf("Error hijack: %s", err)
|
utils.Debugf("Error hijack: %s", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -1576,6 +1583,12 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if autoRemove {
|
||||||
|
_, _, err = cli.call("DELETE", "/containers/"+runResult.ID, nil)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
if status != 0 {
|
if status != 0 {
|
||||||
return &utils.StatusError{Status: status}
|
return &utils.StatusError{Status: status}
|
||||||
}
|
}
|
||||||
|
@ -1729,7 +1742,7 @@ func (cli *DockerCli) stream(method, path string, in io.Reader, out io.Writer, h
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.ReadCloser, out io.Writer) error {
|
func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.ReadCloser, stdout, stderr io.Writer) error {
|
||||||
|
|
||||||
req, err := http.NewRequest(method, fmt.Sprintf("/v%g%s", APIVERSION, path), nil)
|
req, err := http.NewRequest(method, fmt.Sprintf("/v%g%s", APIVERSION, path), nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -1755,10 +1768,16 @@ func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.Rea
|
||||||
rwc, br := clientconn.Hijack()
|
rwc, br := clientconn.Hijack()
|
||||||
defer rwc.Close()
|
defer rwc.Close()
|
||||||
|
|
||||||
var receiveStdout (chan error)
|
var receiveStdout chan error
|
||||||
if out != nil {
|
|
||||||
receiveStdout = utils.Go(func() error {
|
if stdout != nil {
|
||||||
_, err := io.Copy(out, br)
|
receiveStdout = utils.Go(func() (err error) {
|
||||||
|
// When TTY is ON, use regular copy
|
||||||
|
if setRawTerminal {
|
||||||
|
_, err = io.Copy(stdout, br)
|
||||||
|
} else {
|
||||||
|
_, err = utils.StdCopy(stdout, stderr, br)
|
||||||
|
}
|
||||||
utils.Debugf("[hijack] End of stdout")
|
utils.Debugf("[hijack] End of stdout")
|
||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
|
@ -1790,7 +1809,7 @@ func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.Rea
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
if out != nil {
|
if stdout != nil {
|
||||||
if err := <-receiveStdout; err != nil {
|
if err := <-receiveStdout; err != nil {
|
||||||
utils.Debugf("Error receiveStdout: %s", err)
|
utils.Debugf("Error receiveStdout: %s", err)
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -542,3 +542,40 @@ func TestAttachDisconnect(t *testing.T) {
|
||||||
cStdin.Close()
|
cStdin.Close()
|
||||||
container.Wait()
|
container.Wait()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Expected behaviour: container gets deleted automatically after exit
|
||||||
|
func TestRunAutoRemove(t *testing.T) {
|
||||||
|
stdout, stdoutPipe := io.Pipe()
|
||||||
|
cli := NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
||||||
|
defer cleanup(globalRuntime)
|
||||||
|
|
||||||
|
c := make(chan struct{})
|
||||||
|
go func() {
|
||||||
|
defer close(c)
|
||||||
|
if err := cli.CmdRun("-rm", unitTestImageID, "hostname"); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
var temporaryContainerID string
|
||||||
|
setTimeout(t, "Reading command output time out", 2*time.Second, func() {
|
||||||
|
cmdOutput, err := bufio.NewReader(stdout).ReadString('\n')
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
temporaryContainerID = cmdOutput
|
||||||
|
if err := closeWrap(stdout, stdoutPipe); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
setTimeout(t, "CmdRun timed out", 5*time.Second, func() {
|
||||||
|
<-c
|
||||||
|
})
|
||||||
|
|
||||||
|
time.Sleep(500 * time.Millisecond)
|
||||||
|
|
||||||
|
if len(globalRuntime.List()) > 0 {
|
||||||
|
t.Fatalf("failed to remove container automatically: container %s still exists", temporaryContainerID)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
17
container.go
|
@ -126,6 +126,7 @@ func ParseRun(args []string, capabilities *Capabilities) (*Config, *HostConfig,
|
||||||
flContainerIDFile := cmd.String("cidfile", "", "Write the container ID to the file")
|
flContainerIDFile := cmd.String("cidfile", "", "Write the container ID to the file")
|
||||||
flNetwork := cmd.Bool("n", true, "Enable networking for this container")
|
flNetwork := cmd.Bool("n", true, "Enable networking for this container")
|
||||||
flPrivileged := cmd.Bool("privileged", false, "Give extended privileges to this container")
|
flPrivileged := cmd.Bool("privileged", false, "Give extended privileges to this container")
|
||||||
|
flAutoRemove := cmd.Bool("rm", false, "Automatically remove the container when it exits (incompatible with -d)")
|
||||||
|
|
||||||
if capabilities != nil && *flMemory > 0 && !capabilities.MemoryLimit {
|
if capabilities != nil && *flMemory > 0 && !capabilities.MemoryLimit {
|
||||||
//fmt.Fprintf(stdout, "WARNING: Your kernel does not support memory limit capabilities. Limitation discarded.\n")
|
//fmt.Fprintf(stdout, "WARNING: Your kernel does not support memory limit capabilities. Limitation discarded.\n")
|
||||||
|
@ -174,6 +175,10 @@ func ParseRun(args []string, capabilities *Capabilities) (*Config, *HostConfig,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if *flDetach && *flAutoRemove {
|
||||||
|
return nil, nil, cmd, fmt.Errorf("Conflicting options: -rm and -d")
|
||||||
|
}
|
||||||
|
|
||||||
var binds []string
|
var binds []string
|
||||||
|
|
||||||
// add any bind targets to the list of container volumes
|
// add any bind targets to the list of container volumes
|
||||||
|
@ -478,14 +483,12 @@ func (container *Container) Attach(stdin io.ReadCloser, stdinCloser io.Closer, s
|
||||||
utils.Debugf("[start] attach stdout\n")
|
utils.Debugf("[start] attach stdout\n")
|
||||||
defer utils.Debugf("[end] attach stdout\n")
|
defer utils.Debugf("[end] attach stdout\n")
|
||||||
// If we are in StdinOnce mode, then close stdin
|
// If we are in StdinOnce mode, then close stdin
|
||||||
if container.Config.StdinOnce {
|
if container.Config.StdinOnce && stdin != nil {
|
||||||
if stdin != nil {
|
|
||||||
defer stdin.Close()
|
defer stdin.Close()
|
||||||
}
|
}
|
||||||
if stdinCloser != nil {
|
if stdinCloser != nil {
|
||||||
defer stdinCloser.Close()
|
defer stdinCloser.Close()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
_, err := io.Copy(stdout, cStdout)
|
_, err := io.Copy(stdout, cStdout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Debugf("[error] attach stdout: %s\n", err)
|
utils.Debugf("[error] attach stdout: %s\n", err)
|
||||||
|
@ -516,14 +519,12 @@ func (container *Container) Attach(stdin io.ReadCloser, stdinCloser io.Closer, s
|
||||||
utils.Debugf("[start] attach stderr\n")
|
utils.Debugf("[start] attach stderr\n")
|
||||||
defer utils.Debugf("[end] attach stderr\n")
|
defer utils.Debugf("[end] attach stderr\n")
|
||||||
// If we are in StdinOnce mode, then close stdin
|
// If we are in StdinOnce mode, then close stdin
|
||||||
if container.Config.StdinOnce {
|
if container.Config.StdinOnce && stdin != nil {
|
||||||
if stdin != nil {
|
|
||||||
defer stdin.Close()
|
defer stdin.Close()
|
||||||
}
|
}
|
||||||
if stdinCloser != nil {
|
if stdinCloser != nil {
|
||||||
defer stdinCloser.Close()
|
defer stdinCloser.Close()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
_, err := io.Copy(stderr, cStderr)
|
_, err := io.Copy(stderr, cStderr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Debugf("[error] attach stderr: %s\n", err)
|
utils.Debugf("[error] attach stderr: %s\n", err)
|
||||||
|
@ -840,7 +841,7 @@ func (container *Container) Start(hostConfig *HostConfig) error {
|
||||||
|
|
||||||
container.ToDisk()
|
container.ToDisk()
|
||||||
container.SaveHostConfig(hostConfig)
|
container.SaveHostConfig(hostConfig)
|
||||||
go container.monitor()
|
go container.monitor(hostConfig)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -970,7 +971,7 @@ func (container *Container) waitLxc() error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (container *Container) monitor() {
|
func (container *Container) monitor(hostConfig *HostConfig) {
|
||||||
// Wait for the program to exit
|
// Wait for the program to exit
|
||||||
utils.Debugf("Waiting for process")
|
utils.Debugf("Waiting for process")
|
||||||
|
|
||||||
|
|
15
contrib/mkimage-centos.sh
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Create a CentOS base image for Docker
|
||||||
|
# From unclejack https://github.com/dotcloud/docker/issues/290
|
||||||
|
set -e
|
||||||
|
|
||||||
|
MIRROR_URL="http://centos.netnitco.net/6.4/os/x86_64/"
|
||||||
|
MIRROR_URL_UPDATES="http://centos.netnitco.net/6.4/updates/x86_64/"
|
||||||
|
|
||||||
|
yum install -y febootstrap xz
|
||||||
|
|
||||||
|
febootstrap -i bash -i coreutils -i tar -i bzip2 -i gzip -i vim-minimal -i wget -i patch -i diffutils -i iproute -i yum centos centos64 $MIRROR_URL -u $MIRROR_URL_UPDATES
|
||||||
|
touch centos64/etc/resolv.conf
|
||||||
|
touch centos64/sbin/init
|
||||||
|
|
||||||
|
tar --numeric-owner -Jcpf centos-64.tar.xz -C centos64 .
|
|
@ -9,7 +9,6 @@
|
||||||
Docker Remote API
|
Docker Remote API
|
||||||
=================
|
=================
|
||||||
|
|
||||||
.. contents:: Table of Contents
|
|
||||||
|
|
||||||
1. Brief introduction
|
1. Brief introduction
|
||||||
=====================
|
=====================
|
||||||
|
@ -27,14 +26,29 @@ Docker Remote API
|
||||||
2. Versions
|
2. Versions
|
||||||
===========
|
===========
|
||||||
|
|
||||||
The current version of the API is 1.5
|
The current version of the API is 1.6
|
||||||
|
|
||||||
Calling /images/<name>/insert is the same as calling
|
Calling /images/<name>/insert is the same as calling
|
||||||
/v1.5/images/<name>/insert
|
/v1.6/images/<name>/insert
|
||||||
|
|
||||||
You can still call an old version of the api using
|
You can still call an old version of the api using
|
||||||
/v1.0/images/<name>/insert
|
/v1.0/images/<name>/insert
|
||||||
|
|
||||||
|
:doc:`docker_remote_api_v1.6`
|
||||||
|
*****************************
|
||||||
|
|
||||||
|
What's new
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. http:post:: /containers/(id)/attach
|
||||||
|
|
||||||
|
**New!** You can now split stderr from stdout. This is done by prefixing
|
||||||
|
a header to each transmition. See :http:post:`/containers/(id)/attach`.
|
||||||
|
The WebSocket attach is unchanged.
|
||||||
|
Note that attach calls on the previous API version didn't change. Stdout and
|
||||||
|
stderr are merged.
|
||||||
|
|
||||||
|
|
||||||
:doc:`docker_remote_api_v1.5`
|
:doc:`docker_remote_api_v1.5`
|
||||||
*****************************
|
*****************************
|
||||||
|
|
||||||
|
@ -182,36 +196,3 @@ Initial version
|
||||||
.. _8d73740: https://github.com/dotcloud/docker/commit/8d73740343778651c09160cde9661f5f387b36f4
|
.. _8d73740: https://github.com/dotcloud/docker/commit/8d73740343778651c09160cde9661f5f387b36f4
|
||||||
.. _2e7649b: https://github.com/dotcloud/docker/commit/2e7649beda7c820793bd46766cbc2cfeace7b168
|
.. _2e7649b: https://github.com/dotcloud/docker/commit/2e7649beda7c820793bd46766cbc2cfeace7b168
|
||||||
.. _51f6c4a: https://github.com/dotcloud/docker/commit/51f6c4a7372450d164c61e0054daf0223ddbd909
|
.. _51f6c4a: https://github.com/dotcloud/docker/commit/51f6c4a7372450d164c61e0054daf0223ddbd909
|
||||||
|
|
||||||
==================================
|
|
||||||
Docker Remote API Client Libraries
|
|
||||||
==================================
|
|
||||||
|
|
||||||
These libraries have not been tested by the Docker Maintainers for
|
|
||||||
compatibility. Please file issues with the library owners. If you
|
|
||||||
find more library implementations, please list them in Docker doc bugs
|
|
||||||
and we will add the libraries here.
|
|
||||||
|
|
||||||
+----------------------+----------------+--------------------------------------------+
|
|
||||||
| Language/Framework | Name | Repository |
|
|
||||||
+======================+================+============================================+
|
|
||||||
| Python | docker-py | https://github.com/dotcloud/docker-py |
|
|
||||||
+----------------------+----------------+--------------------------------------------+
|
|
||||||
| Ruby | docker-client | https://github.com/geku/docker-client |
|
|
||||||
+----------------------+----------------+--------------------------------------------+
|
|
||||||
| Ruby | docker-api | https://github.com/swipely/docker-api |
|
|
||||||
+----------------------+----------------+--------------------------------------------+
|
|
||||||
| Javascript (NodeJS) | docker.io | https://github.com/appersonlabs/docker.io |
|
|
||||||
| | | Install via NPM: `npm install docker.io` |
|
|
||||||
+----------------------+----------------+--------------------------------------------+
|
|
||||||
| Javascript | docker-js | https://github.com/dgoujard/docker-js |
|
|
||||||
+----------------------+----------------+--------------------------------------------+
|
|
||||||
| Javascript (Angular) | dockerui | https://github.com/crosbymichael/dockerui |
|
|
||||||
| **WebUI** | | |
|
|
||||||
+----------------------+----------------+--------------------------------------------+
|
|
||||||
| Java | docker-java | https://github.com/kpelykh/docker-java |
|
|
||||||
+----------------------+----------------+--------------------------------------------+
|
|
||||||
| Erlang | erldocker | https://github.com/proger/erldocker |
|
|
||||||
+----------------------+----------------+--------------------------------------------+
|
|
||||||
| Go | go-dockerclient| https://github.com/fsouza/go-dockerclient |
|
|
||||||
+----------------------+----------------+--------------------------------------------+
|
|
||||||
|
|
1218
docs/sources/api/docker_remote_api_v1.6.rst
Normal file
|
@ -6,8 +6,6 @@
|
||||||
Docker Index API
|
Docker Index API
|
||||||
=================
|
=================
|
||||||
|
|
||||||
.. contents:: Table of Contents
|
|
||||||
|
|
||||||
1. Brief introduction
|
1. Brief introduction
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
|
@ -42,7 +40,7 @@ User Repo
|
||||||
Authorization: Basic akmklmasadalkm==
|
Authorization: Basic akmklmasadalkm==
|
||||||
X-Docker-Token: true
|
X-Docker-Token: true
|
||||||
|
|
||||||
[{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”}]
|
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"}]
|
||||||
|
|
||||||
:parameter namespace: the namespace for the repo
|
:parameter namespace: the namespace for the repo
|
||||||
:parameter repo_name: the name for the repo
|
:parameter repo_name: the name for the repo
|
||||||
|
@ -54,7 +52,8 @@ User Repo
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
WWW-Authenticate: Token signature=123abc,repository=”foo/bar”,access=write
|
WWW-Authenticate: Token signature=123abc,repository="foo/bar",access=write
|
||||||
|
X-Docker-Token: signature=123abc,repository="foo/bar",access=write
|
||||||
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
|
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
|
||||||
|
|
||||||
""
|
""
|
||||||
|
@ -92,7 +91,8 @@ User Repo
|
||||||
HTTP/1.1 202
|
HTTP/1.1 202
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
WWW-Authenticate: Token signature=123abc,repository=”foo/bar”,access=delete
|
WWW-Authenticate: Token signature=123abc,repository="foo/bar",access=delete
|
||||||
|
X-Docker-Token: signature=123abc,repository="foo/bar",access=delete
|
||||||
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
|
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
|
||||||
|
|
||||||
""
|
""
|
||||||
|
@ -124,7 +124,7 @@ Library Repo
|
||||||
Authorization: Basic akmklmasadalkm==
|
Authorization: Basic akmklmasadalkm==
|
||||||
X-Docker-Token: true
|
X-Docker-Token: true
|
||||||
|
|
||||||
[{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”}]
|
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"}]
|
||||||
|
|
||||||
:parameter repo_name: the library name for the repo
|
:parameter repo_name: the library name for the repo
|
||||||
|
|
||||||
|
@ -135,7 +135,8 @@ Library Repo
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
WWW-Authenticate: Token signature=123abc,repository=”library/foobar”,access=write
|
WWW-Authenticate: Token signature=123abc,repository="library/foobar",access=write
|
||||||
|
X-Docker-Token: signature=123abc,repository="foo/bar",access=write
|
||||||
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
|
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
|
||||||
|
|
||||||
""
|
""
|
||||||
|
@ -174,7 +175,8 @@ Library Repo
|
||||||
HTTP/1.1 202
|
HTTP/1.1 202
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
WWW-Authenticate: Token signature=123abc,repository=”library/foobar”,access=delete
|
WWW-Authenticate: Token signature=123abc,repository="library/foobar",access=delete
|
||||||
|
X-Docker-Token: signature=123abc,repository="foo/bar",access=delete
|
||||||
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
|
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
|
||||||
|
|
||||||
""
|
""
|
||||||
|
@ -205,8 +207,8 @@ User Repo Images
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Authorization: Basic akmklmasadalkm==
|
Authorization: Basic akmklmasadalkm==
|
||||||
|
|
||||||
[{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”,
|
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
|
||||||
“checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”}]
|
"checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"}]
|
||||||
|
|
||||||
:parameter namespace: the namespace for the repo
|
:parameter namespace: the namespace for the repo
|
||||||
:parameter repo_name: the name for the repo
|
:parameter repo_name: the name for the repo
|
||||||
|
@ -250,10 +252,10 @@ User Repo Images
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
[{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”,
|
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
|
||||||
“checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”},
|
"checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"},
|
||||||
{“id”: “ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds”,
|
{"id": "ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds",
|
||||||
“checksum”: “34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew”}]
|
"checksum": "34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew"}]
|
||||||
|
|
||||||
:statuscode 200: OK
|
:statuscode 200: OK
|
||||||
:statuscode 404: Not found
|
:statuscode 404: Not found
|
||||||
|
@ -275,8 +277,8 @@ Library Repo Images
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Authorization: Basic akmklmasadalkm==
|
Authorization: Basic akmklmasadalkm==
|
||||||
|
|
||||||
[{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”,
|
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
|
||||||
“checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”}]
|
"checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"}]
|
||||||
|
|
||||||
:parameter repo_name: the library name for the repo
|
:parameter repo_name: the library name for the repo
|
||||||
|
|
||||||
|
@ -318,10 +320,10 @@ Library Repo Images
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
[{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”,
|
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
|
||||||
“checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”},
|
"checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"},
|
||||||
{“id”: “ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds”,
|
{"id": "ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds",
|
||||||
“checksum”: “34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew”}]
|
"checksum": "34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew"}]
|
||||||
|
|
||||||
:statuscode 200: OK
|
:statuscode 200: OK
|
||||||
:statuscode 404: Not found
|
:statuscode 404: Not found
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
Docker Registry API
|
Docker Registry API
|
||||||
===================
|
===================
|
||||||
|
|
||||||
.. contents:: Table of Contents
|
|
||||||
|
|
||||||
1. Brief introduction
|
1. Brief introduction
|
||||||
=====================
|
=====================
|
||||||
|
@ -61,7 +60,7 @@ Layer
|
||||||
Host: registry-1.docker.io
|
Host: registry-1.docker.io
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Authorization: Token akmklmasadalkmsdfgsdgdge33
|
Authorization: Token signature=123abc,repository="foo/bar",access=read
|
||||||
|
|
||||||
:parameter image_id: the id for the layer you want to get
|
:parameter image_id: the id for the layer you want to get
|
||||||
|
|
||||||
|
@ -71,39 +70,10 @@ Layer
|
||||||
|
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
X-Docker-Registry-Version: 0.6.0
|
||||||
Cookie: (Cookie provided by the Registry)
|
Cookie: (Cookie provided by the Registry)
|
||||||
|
|
||||||
{
|
{layer binary data stream}
|
||||||
id: "088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c",
|
|
||||||
parent: "aeee6396d62273d180a49c96c62e45438d87c7da4a5cf5d2be6bee4e21bc226f",
|
|
||||||
created: "2013-04-30T17:46:10.843673+03:00",
|
|
||||||
container: "8305672a76cc5e3d168f97221106ced35a76ec7ddbb03209b0f0d96bf74f6ef7",
|
|
||||||
container_config: {
|
|
||||||
Hostname: "host-test",
|
|
||||||
User: "",
|
|
||||||
Memory: 0,
|
|
||||||
MemorySwap: 0,
|
|
||||||
AttachStdin: false,
|
|
||||||
AttachStdout: false,
|
|
||||||
AttachStderr: false,
|
|
||||||
PortSpecs: null,
|
|
||||||
Tty: false,
|
|
||||||
OpenStdin: false,
|
|
||||||
StdinOnce: false,
|
|
||||||
Env: null,
|
|
||||||
Cmd: [
|
|
||||||
"/bin/bash",
|
|
||||||
"-c",
|
|
||||||
"apt-get -q -yy -f install libevent-dev"
|
|
||||||
],
|
|
||||||
Dns: null,
|
|
||||||
Image: "imagename/blah",
|
|
||||||
Volumes: { },
|
|
||||||
VolumesFrom: ""
|
|
||||||
},
|
|
||||||
docker_version: "0.1.7"
|
|
||||||
}
|
|
||||||
|
|
||||||
:statuscode 200: OK
|
:statuscode 200: OK
|
||||||
:statuscode 401: Requires authorization
|
:statuscode 401: Requires authorization
|
||||||
|
@ -120,40 +90,10 @@ Layer
|
||||||
|
|
||||||
PUT /v1/images/088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c/layer HTTP/1.1
|
PUT /v1/images/088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c/layer HTTP/1.1
|
||||||
Host: registry-1.docker.io
|
Host: registry-1.docker.io
|
||||||
Accept: application/json
|
Transfer-Encoding: chunked
|
||||||
Content-Type: application/json
|
Authorization: Token signature=123abc,repository="foo/bar",access=write
|
||||||
Authorization: Token akmklmasadalkmsdfgsdgdge33
|
|
||||||
|
|
||||||
{
|
{layer binary data stream}
|
||||||
id: "088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c",
|
|
||||||
parent: "aeee6396d62273d180a49c96c62e45438d87c7da4a5cf5d2be6bee4e21bc226f",
|
|
||||||
created: "2013-04-30T17:46:10.843673+03:00",
|
|
||||||
container: "8305672a76cc5e3d168f97221106ced35a76ec7ddbb03209b0f0d96bf74f6ef7",
|
|
||||||
container_config: {
|
|
||||||
Hostname: "host-test",
|
|
||||||
User: "",
|
|
||||||
Memory: 0,
|
|
||||||
MemorySwap: 0,
|
|
||||||
AttachStdin: false,
|
|
||||||
AttachStdout: false,
|
|
||||||
AttachStderr: false,
|
|
||||||
PortSpecs: null,
|
|
||||||
Tty: false,
|
|
||||||
OpenStdin: false,
|
|
||||||
StdinOnce: false,
|
|
||||||
Env: null,
|
|
||||||
Cmd: [
|
|
||||||
"/bin/bash",
|
|
||||||
"-c",
|
|
||||||
"apt-get -q -yy -f install libevent-dev"
|
|
||||||
],
|
|
||||||
Dns: null,
|
|
||||||
Image: "imagename/blah",
|
|
||||||
Volumes: { },
|
|
||||||
VolumesFrom: ""
|
|
||||||
},
|
|
||||||
docker_version: "0.1.7"
|
|
||||||
}
|
|
||||||
|
|
||||||
:parameter image_id: the id for the layer you want to get
|
:parameter image_id: the id for the layer you want to get
|
||||||
|
|
||||||
|
@ -165,6 +105,7 @@ Layer
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
X-Docker-Registry-Version: 0.6.0
|
||||||
|
|
||||||
""
|
""
|
||||||
|
|
||||||
|
@ -191,13 +132,38 @@ Image
|
||||||
Cookie: (Cookie provided by the Registry)
|
Cookie: (Cookie provided by the Registry)
|
||||||
|
|
||||||
{
|
{
|
||||||
“id”: “088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c”,
|
id: "088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c",
|
||||||
“checksum”: “sha256:b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”
|
parent: "aeee6396d62273d180a49c96c62e45438d87c7da4a5cf5d2be6bee4e21bc226f",
|
||||||
|
created: "2013-04-30T17:46:10.843673+03:00",
|
||||||
|
container: "8305672a76cc5e3d168f97221106ced35a76ec7ddbb03209b0f0d96bf74f6ef7",
|
||||||
|
container_config: {
|
||||||
|
Hostname: "host-test",
|
||||||
|
User: "",
|
||||||
|
Memory: 0,
|
||||||
|
MemorySwap: 0,
|
||||||
|
AttachStdin: false,
|
||||||
|
AttachStdout: false,
|
||||||
|
AttachStderr: false,
|
||||||
|
PortSpecs: null,
|
||||||
|
Tty: false,
|
||||||
|
OpenStdin: false,
|
||||||
|
StdinOnce: false,
|
||||||
|
Env: null,
|
||||||
|
Cmd: [
|
||||||
|
"/bin/bash",
|
||||||
|
"-c",
|
||||||
|
"apt-get -q -yy -f install libevent-dev"
|
||||||
|
],
|
||||||
|
Dns: null,
|
||||||
|
Image: "imagename/blah",
|
||||||
|
Volumes: { },
|
||||||
|
VolumesFrom: ""
|
||||||
|
},
|
||||||
|
docker_version: "0.1.7"
|
||||||
}
|
}
|
||||||
|
|
||||||
:parameter image_id: the id for the layer you want to get
|
:parameter image_id: the id for the layer you want to get
|
||||||
|
|
||||||
|
|
||||||
**Example Response**:
|
**Example Response**:
|
||||||
|
|
||||||
.. sourcecode:: http
|
.. sourcecode:: http
|
||||||
|
@ -205,6 +171,7 @@ Image
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
X-Docker-Registry-Version: 0.6.0
|
||||||
|
|
||||||
""
|
""
|
||||||
|
|
||||||
|
@ -234,10 +201,39 @@ Image
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
X-Docker-Registry-Version: 0.6.0
|
||||||
|
X-Docker-Size: 456789
|
||||||
|
X-Docker-Checksum: b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087
|
||||||
|
|
||||||
{
|
{
|
||||||
“id”: “088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c”,
|
id: "088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c",
|
||||||
“checksum”: “sha256:b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”
|
parent: "aeee6396d62273d180a49c96c62e45438d87c7da4a5cf5d2be6bee4e21bc226f",
|
||||||
|
created: "2013-04-30T17:46:10.843673+03:00",
|
||||||
|
container: "8305672a76cc5e3d168f97221106ced35a76ec7ddbb03209b0f0d96bf74f6ef7",
|
||||||
|
container_config: {
|
||||||
|
Hostname: "host-test",
|
||||||
|
User: "",
|
||||||
|
Memory: 0,
|
||||||
|
MemorySwap: 0,
|
||||||
|
AttachStdin: false,
|
||||||
|
AttachStdout: false,
|
||||||
|
AttachStderr: false,
|
||||||
|
PortSpecs: null,
|
||||||
|
Tty: false,
|
||||||
|
OpenStdin: false,
|
||||||
|
StdinOnce: false,
|
||||||
|
Env: null,
|
||||||
|
Cmd: [
|
||||||
|
"/bin/bash",
|
||||||
|
"-c",
|
||||||
|
"apt-get -q -yy -f install libevent-dev"
|
||||||
|
],
|
||||||
|
Dns: null,
|
||||||
|
Image: "imagename/blah",
|
||||||
|
Volumes: { },
|
||||||
|
VolumesFrom: ""
|
||||||
|
},
|
||||||
|
docker_version: "0.1.7"
|
||||||
}
|
}
|
||||||
|
|
||||||
:statuscode 200: OK
|
:statuscode 200: OK
|
||||||
|
@ -271,6 +267,7 @@ Ancestry
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
X-Docker-Registry-Version: 0.6.0
|
||||||
|
|
||||||
["088b4502f51920fbd9b7c503e87c7a2c05aa3adc3d35e79c031fa126b403200f",
|
["088b4502f51920fbd9b7c503e87c7a2c05aa3adc3d35e79c031fa126b403200f",
|
||||||
"aeee63968d87c7da4a5cf5d2be6bee4e21bc226fd62273d180a49c96c62e4543",
|
"aeee63968d87c7da4a5cf5d2be6bee4e21bc226fd62273d180a49c96c62e4543",
|
||||||
|
@ -297,6 +294,7 @@ Ancestry
|
||||||
Host: registry-1.docker.io
|
Host: registry-1.docker.io
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
X-Docker-Registry-Version: 0.6.0
|
||||||
Cookie: (Cookie provided by the Registry)
|
Cookie: (Cookie provided by the Registry)
|
||||||
|
|
||||||
:parameter namespace: namespace for the repo
|
:parameter namespace: namespace for the repo
|
||||||
|
@ -309,10 +307,11 @@ Ancestry
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
X-Docker-Registry-Version: 0.6.0
|
||||||
|
|
||||||
{
|
{
|
||||||
"latest": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
|
"latest": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
|
||||||
“0.1.1”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”
|
"0.1.1": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"
|
||||||
}
|
}
|
||||||
|
|
||||||
:statuscode 200: OK
|
:statuscode 200: OK
|
||||||
|
@ -332,6 +331,7 @@ Ancestry
|
||||||
Host: registry-1.docker.io
|
Host: registry-1.docker.io
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
X-Docker-Registry-Version: 0.6.0
|
||||||
Cookie: (Cookie provided by the Registry)
|
Cookie: (Cookie provided by the Registry)
|
||||||
|
|
||||||
:parameter namespace: namespace for the repo
|
:parameter namespace: namespace for the repo
|
||||||
|
@ -345,6 +345,7 @@ Ancestry
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
X-Docker-Registry-Version: 0.6.0
|
||||||
|
|
||||||
"9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"
|
"9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"
|
||||||
|
|
||||||
|
@ -377,6 +378,7 @@ Ancestry
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
X-Docker-Registry-Version: 0.6.0
|
||||||
|
|
||||||
""
|
""
|
||||||
|
|
||||||
|
@ -399,7 +401,7 @@ Ancestry
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Cookie: (Cookie provided by the Registry)
|
Cookie: (Cookie provided by the Registry)
|
||||||
|
|
||||||
“9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”
|
"9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"
|
||||||
|
|
||||||
:parameter namespace: namespace for the repo
|
:parameter namespace: namespace for the repo
|
||||||
:parameter repository: name for the repo
|
:parameter repository: name for the repo
|
||||||
|
@ -412,6 +414,7 @@ Ancestry
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
X-Docker-Registry-Version: 0.6.0
|
||||||
|
|
||||||
""
|
""
|
||||||
|
|
||||||
|
@ -449,6 +452,7 @@ Ancestry
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
X-Docker-Registry-Version: 0.6.0
|
||||||
|
|
||||||
""
|
""
|
||||||
|
|
||||||
|
@ -456,8 +460,44 @@ Ancestry
|
||||||
:statuscode 401: Requires authorization
|
:statuscode 401: Requires authorization
|
||||||
:statuscode 404: Repository not found
|
:statuscode 404: Repository not found
|
||||||
|
|
||||||
3.0 Authorization
|
2.4 Status
|
||||||
=================
|
----------
|
||||||
|
|
||||||
|
.. http:get /v1/_ping
|
||||||
|
|
||||||
|
Check status of the registry. This endpoint is also used to determine if
|
||||||
|
the registry supports SSL.
|
||||||
|
|
||||||
|
**Example Request**:
|
||||||
|
|
||||||
|
.. sourcecode:: http
|
||||||
|
|
||||||
|
GET /v1/_ping HTTP/1.1
|
||||||
|
Host: registry-1.docker.io
|
||||||
|
Accept: application/json
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
""
|
||||||
|
|
||||||
|
:parameter namespace: namespace for the repo
|
||||||
|
:parameter repository: name for the repo
|
||||||
|
|
||||||
|
**Example Response**:
|
||||||
|
|
||||||
|
.. sourcecode:: http
|
||||||
|
|
||||||
|
HTTP/1.1 200
|
||||||
|
Vary: Accept
|
||||||
|
Content-Type: application/json
|
||||||
|
X-Docker-Registry-Version: 0.6.0
|
||||||
|
|
||||||
|
""
|
||||||
|
|
||||||
|
:statuscode 200: OK
|
||||||
|
|
||||||
|
|
||||||
|
3 Authorization
|
||||||
|
===============
|
||||||
This is where we describe the authorization process, including the tokens and cookies.
|
This is where we describe the authorization process, including the tokens and cookies.
|
||||||
|
|
||||||
TODO: add more info.
|
TODO: add more info.
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
Registry & Index Spec
|
Registry & Index Spec
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
.. contents:: Table of Contents
|
|
||||||
|
|
||||||
1. The 3 roles
|
1. The 3 roles
|
||||||
===============
|
===============
|
||||||
|
|
||||||
|
@ -564,8 +562,8 @@ Next request::
|
||||||
Cookie: session="wD/J7LqL5ctqw8haL10vgfhrb2Q=?foo=UydiYXInCnAxCi4=×tamp=RjEzNjYzMTQ5NDcuNDc0NjQzCi4="
|
Cookie: session="wD/J7LqL5ctqw8haL10vgfhrb2Q=?foo=UydiYXInCnAxCi4=×tamp=RjEzNjYzMTQ5NDcuNDc0NjQzCi4="
|
||||||
|
|
||||||
|
|
||||||
7.0 Document Version
|
7 Document Version
|
||||||
---------------------
|
====================
|
||||||
|
|
||||||
- 1.0 : May 6th 2013 : initial release
|
- 1.0 : May 6th 2013 : initial release
|
||||||
- 1.1 : June 1st 2013 : Added Delete Repository and way to handle new source namespace.
|
- 1.1 : June 1st 2013 : Added Delete Repository and way to handle new source namespace.
|
||||||
|
|
37
docs/sources/api/remote_api_client_libraries.rst
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
:title: Registry API
|
||||||
|
:description: Various client libraries available to use with the Docker remote API
|
||||||
|
:keywords: API, Docker, index, registry, REST, documentation, clients, Python, Ruby, Javascript, Erlang, Go
|
||||||
|
|
||||||
|
|
||||||
|
==================================
|
||||||
|
Docker Remote API Client Libraries
|
||||||
|
==================================
|
||||||
|
|
||||||
|
These libraries have not been tested by the Docker Maintainers for
|
||||||
|
compatibility. Please file issues with the library owners. If you
|
||||||
|
find more library implementations, please list them in Docker doc bugs
|
||||||
|
and we will add the libraries here.
|
||||||
|
|
||||||
|
+----------------------+----------------+--------------------------------------------+
|
||||||
|
| Language/Framework | Name | Repository |
|
||||||
|
+======================+================+============================================+
|
||||||
|
| Python | docker-py | https://github.com/dotcloud/docker-py |
|
||||||
|
+----------------------+----------------+--------------------------------------------+
|
||||||
|
| Ruby | docker-client | https://github.com/geku/docker-client |
|
||||||
|
+----------------------+----------------+--------------------------------------------+
|
||||||
|
| Ruby | docker-api | https://github.com/swipely/docker-api |
|
||||||
|
+----------------------+----------------+--------------------------------------------+
|
||||||
|
| Javascript (NodeJS) | docker.io | https://github.com/appersonlabs/docker.io |
|
||||||
|
| | | Install via NPM: `npm install docker.io` |
|
||||||
|
+----------------------+----------------+--------------------------------------------+
|
||||||
|
| Javascript | docker-js | https://github.com/dgoujard/docker-js |
|
||||||
|
+----------------------+----------------+--------------------------------------------+
|
||||||
|
| Javascript (Angular) | dockerui | https://github.com/crosbymichael/dockerui |
|
||||||
|
| **WebUI** | | |
|
||||||
|
+----------------------+----------------+--------------------------------------------+
|
||||||
|
| Java | docker-java | https://github.com/kpelykh/docker-java |
|
||||||
|
+----------------------+----------------+--------------------------------------------+
|
||||||
|
| Erlang | erldocker | https://github.com/proger/erldocker |
|
||||||
|
+----------------------+----------------+--------------------------------------------+
|
||||||
|
| Go | go-dockerclient| https://github.com/fsouza/go-dockerclient |
|
||||||
|
+----------------------+----------------+--------------------------------------------+
|
|
@ -8,7 +8,7 @@ Overview
|
||||||
======================
|
======================
|
||||||
|
|
||||||
Docker Usage
|
Docker Usage
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
To list available commands, either run ``docker`` with no parameters or execute
|
To list available commands, either run ``docker`` with no parameters or execute
|
||||||
``docker help``::
|
``docker help``::
|
||||||
|
@ -21,40 +21,71 @@ To list available commands, either run ``docker`` with no parameters or execute
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Available Commands
|
Available Commands
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
.. toctree::
|
.. include:: command/attach.rst
|
||||||
:maxdepth: 2
|
|
||||||
|
.. include:: command/build.rst
|
||||||
|
|
||||||
|
.. include:: command/commit.rst
|
||||||
|
|
||||||
|
.. include:: command/cp.rst
|
||||||
|
|
||||||
|
.. include:: command/diff.rst
|
||||||
|
|
||||||
|
.. include:: command/events.rst
|
||||||
|
|
||||||
|
.. include:: command/export.rst
|
||||||
|
|
||||||
|
.. include:: command/history.rst
|
||||||
|
|
||||||
|
.. include:: command/images.rst
|
||||||
|
|
||||||
|
.. include:: command/import.rst
|
||||||
|
|
||||||
|
.. include:: command/info.rst
|
||||||
|
|
||||||
|
.. include:: command/insert.rst
|
||||||
|
|
||||||
|
.. include:: command/inspect.rst
|
||||||
|
|
||||||
|
.. include:: command/kill.rst
|
||||||
|
|
||||||
|
.. include:: command/login.rst
|
||||||
|
|
||||||
|
.. include:: command/logs.rst
|
||||||
|
|
||||||
|
.. include:: command/port.rst
|
||||||
|
|
||||||
|
.. include:: command/ps.rst
|
||||||
|
|
||||||
|
.. include:: command/pull.rst
|
||||||
|
|
||||||
|
.. include:: command/push.rst
|
||||||
|
|
||||||
|
.. include:: command/restart.rst
|
||||||
|
|
||||||
|
.. include:: command/rm.rst
|
||||||
|
|
||||||
|
.. include:: command/rmi.rst
|
||||||
|
|
||||||
|
.. include:: command/run.rst
|
||||||
|
|
||||||
|
.. include:: command/search.rst
|
||||||
|
|
||||||
|
.. include:: command/start.rst
|
||||||
|
|
||||||
|
.. include:: command/stop.rst
|
||||||
|
|
||||||
|
.. include:: command/tag.rst
|
||||||
|
|
||||||
|
.. include:: command/top.rst
|
||||||
|
|
||||||
|
.. include:: command/version.rst
|
||||||
|
|
||||||
|
.. include:: command/wait.rst
|
||||||
|
|
||||||
|
|
||||||
command/attach
|
|
||||||
command/build
|
|
||||||
command/commit
|
|
||||||
command/cp
|
|
||||||
command/diff
|
|
||||||
command/events
|
|
||||||
command/export
|
|
||||||
command/history
|
|
||||||
command/images
|
|
||||||
command/import
|
|
||||||
command/info
|
|
||||||
command/insert
|
|
||||||
command/inspect
|
|
||||||
command/kill
|
|
||||||
command/login
|
|
||||||
command/logs
|
|
||||||
command/port
|
|
||||||
command/ps
|
|
||||||
command/pull
|
|
||||||
command/push
|
|
||||||
command/restart
|
|
||||||
command/rm
|
|
||||||
command/rmi
|
|
||||||
command/run
|
|
||||||
command/search
|
|
||||||
command/start
|
|
||||||
command/stop
|
|
||||||
command/tag
|
|
||||||
command/top
|
|
||||||
command/version
|
|
||||||
command/wait
|
|
||||||
|
|
|
@ -23,4 +23,4 @@ Displaying images visually
|
||||||
|
|
||||||
sudo docker images -viz | dot -Tpng -o docker.png
|
sudo docker images -viz | dot -Tpng -o docker.png
|
||||||
|
|
||||||
.. image:: images/docker_images.gif
|
.. image:: https://docs.docker.io/en/latest/_static/docker_images.gif
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
-m=0: Memory limit (in bytes)
|
-m=0: Memory limit (in bytes)
|
||||||
-n=true: Enable networking for this container
|
-n=true: Enable networking for this container
|
||||||
-p=[]: Map a network port to the container
|
-p=[]: Map a network port to the container
|
||||||
|
-rm=false: Automatically remove the container when it exits (incompatible with -d)
|
||||||
-t=false: Allocate a pseudo-tty
|
-t=false: Allocate a pseudo-tty
|
||||||
-u="": Username or UID
|
-u="": Username or UID
|
||||||
-dns=[]: Set custom dns servers for the container
|
-dns=[]: Set custom dns servers for the container
|
||||||
|
|
|
@ -2,6 +2,11 @@
|
||||||
:description: A simple hello world example with Docker
|
:description: A simple hello world example with Docker
|
||||||
:keywords: docker, example, hello world
|
:keywords: docker, example, hello world
|
||||||
|
|
||||||
|
.. _examples:
|
||||||
|
|
||||||
|
Hello World
|
||||||
|
-----------
|
||||||
|
|
||||||
.. _running_examples:
|
.. _running_examples:
|
||||||
|
|
||||||
Running the Examples
|
Running the Examples
|
||||||
|
@ -166,13 +171,11 @@ See the example in action
|
||||||
The next example in the series is a :ref:`python_web_app` example, or
|
The next example in the series is a :ref:`python_web_app` example, or
|
||||||
you could skip to any of the other examples:
|
you could skip to any of the other examples:
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 1
|
|
||||||
|
|
||||||
python_web_app
|
* :ref:`python_web_app`
|
||||||
nodejs_web_app
|
* :ref:`nodejs_web_app`
|
||||||
running_redis_service
|
* :ref:`running_redis_service`
|
||||||
running_ssh_service
|
* :ref:`running_ssh_service`
|
||||||
couchdb_data_volumes
|
* :ref:`running_couchdb_service`
|
||||||
postgresql_service
|
* :ref:`postgresql_service`
|
||||||
mongodb
|
* :ref:`mongodb`
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
:description: An overview of the Docker Documentation
|
:description: An overview of the Docker Documentation
|
||||||
:keywords: containers, lxc, concepts, explanation
|
:keywords: containers, lxc, concepts, explanation
|
||||||
|
|
||||||
.. image:: static_files/dockerlogo-h.png
|
.. image:: https://www.docker.io/static/img/linked/dockerlogo-horizontal.png
|
||||||
|
|
||||||
Introduction
|
Introduction
|
||||||
------------
|
------------
|
||||||
|
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
@ -8,7 +8,7 @@ Documentation
|
||||||
This documentation has the following resources:
|
This documentation has the following resources:
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:titlesonly:
|
:maxdepth: 1
|
||||||
|
|
||||||
Introduction <index>
|
Introduction <index>
|
||||||
installation/index
|
installation/index
|
||||||
|
|
|
@ -37,5 +37,7 @@ There are more example scripts for creating base images in the
|
||||||
Docker Github Repo:
|
Docker Github Repo:
|
||||||
|
|
||||||
* `BusyBox <https://github.com/dotcloud/docker/blob/master/contrib/mkimage-busybox.sh>`_
|
* `BusyBox <https://github.com/dotcloud/docker/blob/master/contrib/mkimage-busybox.sh>`_
|
||||||
* `Debian
|
* `CentOS
|
||||||
|
<https://github.com/dotcloud/docker/blob/master/contrib/mkimage-centos.sh>`_
|
||||||
|
* `Debian/Ubuntu
|
||||||
<https://github.com/dotcloud/docker/blob/master/contrib/mkimage-debian.sh>`_
|
<https://github.com/dotcloud/docker/blob/master/contrib/mkimage-debian.sh>`_
|
||||||
|
|
|
@ -176,3 +176,30 @@ you can push and pull it like any other repository, but it will
|
||||||
**not** be searchable (or indexed at all) in the Central Index, and
|
**not** be searchable (or indexed at all) in the Central Index, and
|
||||||
there will be no user name checking performed. Your registry will
|
there will be no user name checking performed. Your registry will
|
||||||
function completely independently from the Central Index.
|
function completely independently from the Central Index.
|
||||||
|
|
||||||
|
Authentication file
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
The authentication is stored in a json file, ``.dockercfg`` located in your
|
||||||
|
home directory. It supports multiple registry urls.
|
||||||
|
|
||||||
|
``docker login`` will create the "https://index.docker.io/v1/" key.
|
||||||
|
|
||||||
|
``docker login https://my-registry.com`` will create the "https://my-registry.com" key.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
|
{
|
||||||
|
"https://index.docker.io/v1/": {
|
||||||
|
"auth": "xXxXxXxXxXx=",
|
||||||
|
"email": "email@example.com"
|
||||||
|
},
|
||||||
|
"https://my-registry.com": {
|
||||||
|
"auth": "XxXxXxXxXxX=",
|
||||||
|
"email": "email@my-registry.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
The ``auth`` field represents ``base64(<username>:<password>)``
|
||||||
|
|
253
docs/theme/docker/layout.html
vendored
|
@ -1,16 +1,9 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
|
||||||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
|
||||||
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
|
|
||||||
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<meta name="google-site-verification" content="UxV66EKuPe87dgnH1sbrldrx6VsoWMrx5NjwkgUFxXI" />
|
<meta name="google-site-verification" content="UxV66EKuPe87dgnH1sbrldrx6VsoWMrx5NjwkgUFxXI" />
|
||||||
|
|
||||||
<title>{{ meta['title'] if meta and meta['title'] else title }} - Docker Documentation</title>
|
<title>{{ meta['title'] if meta and meta['title'] else title }} - Docker Documentation</title>
|
||||||
|
|
||||||
<meta name="description" content="{{ meta['description'] if meta }}" />
|
<meta name="description" content="{{ meta['description'] if meta }}" />
|
||||||
<meta name="keywords" content="{{ meta['keywords'] if meta }}" />
|
<meta name="keywords" content="{{ meta['keywords'] if meta }}" />
|
||||||
|
|
||||||
|
@ -18,29 +11,20 @@
|
||||||
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
|
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// This is probably used by the search engine
|
// This is included here for Javascript that doesn't have access to the templates.
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var doc_version = "{{ current_version }}";
|
||||||
URL_ROOT: '{{ url_root }}',
|
var doc_slug = "{{ slug }}";
|
||||||
VERSION: '{{ release|e }}',
|
|
||||||
COLLAPSE_INDEX: false,
|
|
||||||
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
|
|
||||||
HAS_SOURCE: {{ has_source|lower }}
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{%- set css_files = css_files + ['_static/css/bootstrap.css'] %}
|
{%- set css_files = css_files + ['_static/css/bootstrap.css'] %}
|
||||||
{%- set css_files = css_files + ['_static/css/bootstrap-responsive.css'] %}
|
|
||||||
{%- set css_files = css_files + ['_static/pygments.css'] %}
|
{%- set css_files = css_files + ['_static/pygments.css'] %}
|
||||||
{%- set css_files = css_files + ['_static/css/main.css'] %}
|
{%- set css_files = css_files + ['_static/css/main.css'] %}
|
||||||
|
|
||||||
{%- set script_files =
|
{%- set script_files =
|
||||||
['https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js']
|
['//code.jquery.com/jquery-1.10.1.min.js']
|
||||||
+ ['https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js']
|
+ ['//fonts.googleapis.com/css?family=Cabin:400,700,400italic']
|
||||||
+ script_files
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
{%- set script_files = script_files + ['_static/js/docs.js'] %}
|
|
||||||
|
|
||||||
{%- if pagename == 'index' %}
|
{%- if pagename == 'index' %}
|
||||||
<link rel="canonical" href="http://docs.docker.io/en/latest/">
|
<link rel="canonical" href="http://docs.docker.io/en/latest/">
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -53,19 +37,17 @@
|
||||||
{%- for scriptfile in script_files if scriptfile != '_static/jquery.js' %}
|
{%- for scriptfile in script_files if scriptfile != '_static/jquery.js' %}
|
||||||
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
|
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
<link rel="shortcut icon" href="{{ pathto('_static/favicon.png', 1) }}"/>
|
<link rel="shortcut icon" href="{{ pathto('_static/favicon.png', 1) }}"/>
|
||||||
|
|
||||||
|
|
||||||
{%- block extrahead %}{% endblock %}
|
{%- block extrahead %}{% endblock %}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="navbar navbar-fixed-top">
|
<div id="wrap">
|
||||||
|
<div class="navbar navbar-static-top navbar-inner navbar-fixed-top ">
|
||||||
<div class="navbar-dotcloud">
|
<div class="navbar-dotcloud">
|
||||||
<div class="container" style="text-align: center;">
|
<div class="container">
|
||||||
|
|
||||||
<div style="float: right" class="pull-right">
|
<div style="float: right" class="pull-right">
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
|
@ -75,49 +57,37 @@
|
||||||
<li id="nav-community"><a href="http://www.docker.io/community/" title="Community">Community</a></li>
|
<li id="nav-community"><a href="http://www.docker.io/community/" title="Community">Community</a></li>
|
||||||
<li id="nav-documentation" class="active"><a href="http://docs.docker.io/en/latest/">Documentation</a></li>
|
<li id="nav-documentation" class="active"><a href="http://docs.docker.io/en/latest/">Documentation</a></li>
|
||||||
<li id="nav-blog"><a href="http://blog.docker.io/" title="Docker Blog">Blog</a></li>
|
<li id="nav-blog"><a href="http://blog.docker.io/" title="Docker Blog">Blog</a></li>
|
||||||
<li id="nav-index"><a href="http://index.docker.io/" title="Docker Image Index, find images here">INDEX <img class="inline-icon" src="{{ pathto('_static/img/external-link-icon.png', 1) }}" title="external link"> </a></li>
|
<li id="nav-index"><a href="http://index.docker.io/" title="Docker Image Index, find images here">INDEX <img class="inline-icon" alt="link to external site" src="{{ pathto('_static/img/external-link-icon.png', 1) }}" title="external link"> </a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="margin-left: -12px; float: left;">
|
<div class="brand-logo">
|
||||||
<a href="http://www.docker.io" title="Docker Homepage"><img style="margin-top: 0px; height: 60px; width: 160px; margin-left: 10px;" src="{{ pathto('_static/img/docker-top-logo.png', 1) }}"></a>
|
<a href="http://www.docker.io" title="Docker Homepage"><img src="{{ pathto('_static/img/docker-top-logo.png', 1) }}" alt="Docker logo"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="span12 titlebar">
|
|
||||||
<!--<span class="pull-right" style="margin-left: 20px; font-size: 20px">{{version}}</span>-->
|
|
||||||
<div class="pull-right" id="fork-us" style="margin-top: 16px; margin-right: 16px;">
|
|
||||||
<a href="https://github.com/dotcloud/docker/blob/master/docs/sources/{{ pagename }}.rst"><img src="{{ pathto('_static/img/fork-us.png', 1) }}"> Edit this page on Github</a>
|
|
||||||
</div>
|
|
||||||
<h1 class="pageheader"><a href="http://docs.docker.io/en/latest/" title="Documentation" style="color: white;">DOCUMENTATION</a></h1>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<!-- Docs nav
|
<!-- Docs nav
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<div class="row" style="position: relative">
|
<div class="row main-row">
|
||||||
|
|
||||||
<div class="span3 sidebar bs-docs-sidebar">
|
<div class="span3 sidebar bs-docs-sidebar">
|
||||||
|
<div class="page-title" >
|
||||||
|
<h4>DOCUMENTATION</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{ toctree(collapse=False, maxdepth=3) }}
|
{{ toctree(collapse=False, maxdepth=3) }}
|
||||||
<form>
|
<form>
|
||||||
<input type="text" id="st-search-input" class="st-search-input span3" style="width:160px;" />
|
<input type="text" id="st-search-input" class="st-search-input span3" style="width:160px;" />
|
||||||
|
<div id="st-results-container"></div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- body block -->
|
<!-- body block -->
|
||||||
<div class="span9">
|
<div class="span9 main-content">
|
||||||
|
|
||||||
<!-- Main section
|
<!-- Main section
|
||||||
================================================== -->
|
================================================== -->
|
||||||
|
@ -125,9 +95,56 @@
|
||||||
{% block body %}{% endblock %}
|
{% block body %}{% endblock %}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- Swiftype search -->
|
<div class="pull-right"><a href="https://github.com/dotcloud/docker/blob/{{ current_version }}/docs/sources/{{ pagename }}.rst" title="edit this article">Edit this article on GitHub</a></div>
|
||||||
<div id="st-results-container"></div>
|
</div>
|
||||||
<script type="text/javascript">
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="push-the-footer"></div>
|
||||||
|
</div> <!-- end wrap for pushing footer -->
|
||||||
|
|
||||||
|
<div id="footer">
|
||||||
|
<div class="footer-landscape">
|
||||||
|
<div class="footer-landscape-image">
|
||||||
|
<!-- footer -->
|
||||||
|
<div class="container">
|
||||||
|
<div class="row footer">
|
||||||
|
<div class="span12 tbox">
|
||||||
|
<div class="tbox">
|
||||||
|
<p>Docker is an open source project, sponsored by <a href="https://dotcloud.com">dotCloud</a>, under the <a href="https://github.com/dotcloud/docker/blob/master/LICENSE" title="Docker licence, hosted in the Github repository">apache 2.0 licence</a></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="social links">
|
||||||
|
<a class="twitter" href="http://twitter.com/docker">Twitter</a>
|
||||||
|
<a class="github" href="https://github.com/dotcloud/docker/">GitHub</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tbox version-flyer ">
|
||||||
|
<div class="content">
|
||||||
|
<small>Current version:</small>
|
||||||
|
<ul class="inline">
|
||||||
|
{% for slug, url in versions %}
|
||||||
|
<li class="alternative"><a href="{{ url }}{{ pagename }}/" title="Switch to {{ slug }}">{{ slug }}</a></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- end of footer -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript" src="{{ pathto('_static/js/docs.js', 1) }}"></script>
|
||||||
|
|
||||||
|
<!-- Swiftype search -->
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
var Swiftype = window.Swiftype || {};
|
var Swiftype = window.Swiftype || {};
|
||||||
(function() {
|
(function() {
|
||||||
Swiftype.key = 'pWPnnyvwcfpcrw1o51Sz';
|
Swiftype.key = 'pWPnnyvwcfpcrw1o51Sz';
|
||||||
|
@ -143,135 +160,11 @@
|
||||||
var entry = document.getElementsByTagName('script')[0];
|
var entry = document.getElementsByTagName('script')[0];
|
||||||
entry.parentNode.insertBefore(script, entry);
|
entry.parentNode.insertBefore(script, entry);
|
||||||
}());
|
}());
|
||||||
</script>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="footer" class="container" >
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="span12 footer">
|
|
||||||
<div class="tbox textright forceleftmargin social links pull-right">
|
|
||||||
<a class="twitter" href="http://twitter.com/docker">Twitter</a>
|
|
||||||
<a class="github" href="https://github.com/dotcloud/docker/">GitHub</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
Docker is a project by <a href="http://www.dotcloud.com">dotCloud</a>
|
|
||||||
|
|
||||||
|
|
||||||
{# {%- if show_source and has_source and sourcename %}#}
|
|
||||||
{# ·#}
|
|
||||||
{# <a href="{{ pathto('_sources/' + sourcename, true)|e }}"#}
|
|
||||||
{# rel="nofollow">View the RST source of this page</a>#}
|
|
||||||
{# {%- endif %}#}
|
|
||||||
{# {%- if pagename != "search" %}#}
|
|
||||||
|
|
||||||
{#TODO: Make a proper location for the search #}
|
|
||||||
{# Search:#}
|
|
||||||
{# <form#}
|
|
||||||
{# style="display: inline;"#}
|
|
||||||
{# class="search" action="{{ pathto('search') }}" method="get">#}
|
|
||||||
{# <input type="text" name="q" size="18" />#}
|
|
||||||
{# <input type="hidden" name="check_keywords" value="yes" />#}
|
|
||||||
{# <input type="hidden" name="area" value="default" />#}
|
|
||||||
{# </form>#}
|
|
||||||
{# {%- endif %}#}
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- script which should be loaded after everything else -->
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
// Function to make the sticky header possible
|
|
||||||
var shiftWindow = function() {
|
|
||||||
scrollBy(0, -70);
|
|
||||||
console.log("window shifted")
|
|
||||||
};
|
|
||||||
window.addEventListener("hashchange", shiftWindow);
|
|
||||||
|
|
||||||
function loadShift() {
|
|
||||||
if (window.location.hash) {
|
|
||||||
console.log("window has hash");
|
|
||||||
shiftWindow();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$(window).load(function() {
|
|
||||||
loadShift();
|
|
||||||
console.log("late loadshift");
|
|
||||||
});
|
|
||||||
|
|
||||||
$(function(){
|
|
||||||
|
|
||||||
// sidebar accordian-ing
|
|
||||||
// don't apply on last object (it should be the FAQ)
|
|
||||||
|
|
||||||
// define an array to which all opened items should be added
|
|
||||||
var openmenus = [];
|
|
||||||
|
|
||||||
var elements = $('.toctree-l2');
|
|
||||||
for (var i = 0; i < elements.length; i += 1) { var current = $(elements[i]); current.children('ul').hide();}
|
|
||||||
|
|
||||||
|
|
||||||
// set initial collapsed state
|
|
||||||
var elements = $('.toctree-l1');
|
|
||||||
for (var i = 0; i < elements.length; i += 1) {
|
|
||||||
var current = $(elements[i]);
|
|
||||||
if (current.hasClass('current')) {
|
|
||||||
|
|
||||||
currentlink = current.children('a')[0].href;
|
|
||||||
openmenus.push(currentlink);
|
|
||||||
|
|
||||||
// do nothing
|
|
||||||
} else {
|
|
||||||
// collapse children
|
|
||||||
current.children('ul').hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// attached handler on click
|
|
||||||
// Do not attach to first element or last (intro, faq) so that
|
|
||||||
// first and last link directly instead of accordian
|
|
||||||
$('.sidebar > ul > li > a').not(':last').not(':first').click(function(){
|
|
||||||
|
|
||||||
var index = $.inArray(this.href, openmenus)
|
|
||||||
|
|
||||||
if (index > -1) {
|
|
||||||
console.log(index);
|
|
||||||
openmenus.splice(index, 1);
|
|
||||||
|
|
||||||
|
|
||||||
$(this).parent().children('ul').slideUp(200, function() {
|
|
||||||
// $(this).parent().removeClass('current'); // toggle after effect
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
openmenus.push(this.href);
|
|
||||||
console.log(this);
|
|
||||||
|
|
||||||
var current = $(this);
|
|
||||||
|
|
||||||
setTimeout(function() {
|
|
||||||
$('.sidebar > ul > li').removeClass('current');
|
|
||||||
current.parent().addClass('current'); // toggle before effect
|
|
||||||
current.parent().children('ul').hide();
|
|
||||||
current.parent().children('ul').slideDown(200);
|
|
||||||
}, 100);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Google analytics -->
|
|
||||||
<script type="text/javascript">
|
<!-- Google analytics -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
var _gaq = _gaq || [];
|
var _gaq = _gaq || [];
|
||||||
_gaq.push(['_setAccount', 'UA-6096819-11']);
|
_gaq.push(['_setAccount', 'UA-6096819-11']);
|
||||||
|
@ -285,7 +178,7 @@
|
||||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
1109
docs/theme/docker/static/css/bootstrap-responsive.css
vendored
686
docs/theme/docker/static/css/main.css
vendored
|
@ -1,280 +1,205 @@
|
||||||
/* ==========================================================================
|
.debug {
|
||||||
Author's custom styles
|
border: 2px dotted red !important;
|
||||||
========================================================================== */
|
box-sizing: border-box;
|
||||||
.red {
|
-moz-box-sizing: border-box;
|
||||||
background-color: red;
|
|
||||||
}
|
|
||||||
.blue {
|
|
||||||
background-color: blue;
|
|
||||||
}
|
|
||||||
.orange {
|
|
||||||
background-color: orange;
|
|
||||||
}
|
|
||||||
.gray {
|
|
||||||
background-color: grey;
|
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
padding-top: 58px;
|
min-width: 940px;
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
font-family: "Cabin", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
h1,
|
p a {
|
||||||
h2,
|
text-decoration: underline;
|
||||||
h3,
|
|
||||||
h4 {
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
font-weight: 900;
|
|
||||||
}
|
}
|
||||||
/* ===================
|
p a.btn {
|
||||||
Top navigation
|
text-decoration: none;
|
||||||
===================== */
|
}
|
||||||
.navbar {
|
.brand.logo a {
|
||||||
z-index: 999;
|
text-decoration: none;
|
||||||
background-color: white;
|
}
|
||||||
|
.navbar .navbar-inner {
|
||||||
|
padding-left: 0px;
|
||||||
|
padding-right: 0px;
|
||||||
}
|
}
|
||||||
.navbar .nav li a {
|
.navbar .nav li a {
|
||||||
padding: 22px 15px 22px;
|
padding: 24.2857142855px 17px 24.2857142855px;
|
||||||
|
color: #777777;
|
||||||
|
text-decoration: none;
|
||||||
|
text-shadow: 0 1px 0 #f2f2f2;
|
||||||
}
|
}
|
||||||
.navbar-dotcloud .container {
|
.navbar .nav > li {
|
||||||
border-bottom: 2px #000000 solid;
|
float: left;
|
||||||
|
}
|
||||||
|
.nav-underline {
|
||||||
|
height: 6px;
|
||||||
|
background-color: #71afc0;
|
||||||
|
}
|
||||||
|
.nav-login li a {
|
||||||
|
color: white;
|
||||||
|
padding: 10px 15px 10px;
|
||||||
|
}
|
||||||
|
.navbar .brand {
|
||||||
|
margin-left: 0px;
|
||||||
|
float: left;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.navbar-inner {
|
||||||
|
min-height: 70px;
|
||||||
|
padding-left: 20px;
|
||||||
|
padding-right: 20px;
|
||||||
|
background-color: #ededed;
|
||||||
|
background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));
|
||||||
|
background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);
|
||||||
|
background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);
|
||||||
|
background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);
|
||||||
|
border: 1px solid #c7c7c7;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
||||||
|
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
||||||
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
||||||
|
}
|
||||||
|
.brand.logo a {
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
.inline-icon {
|
.inline-icon {
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
/*
|
.row {
|
||||||
* Responsive YouTube, Vimeo, Embed, and HTML5 Videos with CSS
|
|
||||||
* http://www.jonsuh.com
|
|
||||||
*
|
|
||||||
* Copyright (c) 2012 Jonathan Suh
|
|
||||||
* Free to use under the MIT license.
|
|
||||||
* http://www.opensource.org/licenses/mit-license.php
|
|
||||||
*/
|
|
||||||
.js-video {
|
|
||||||
height: 0;
|
|
||||||
padding-top: 25px;
|
|
||||||
padding-bottom: 67.5%;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.js-video.vimeo {
|
|
||||||
padding-top: 0;
|
|
||||||
}
|
|
||||||
.js-video.widescreen {
|
|
||||||
padding-bottom: 57.25%;
|
|
||||||
}
|
|
||||||
.js-video embed,
|
|
||||||
.js-video iframe,
|
|
||||||
.js-video object,
|
|
||||||
.js-video video {
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
/* Responsive */
|
|
||||||
@media (max-width: 767px) {
|
|
||||||
.js-video {
|
|
||||||
padding-top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* button style from http://charliepark.org/bootstrap_buttons/ */
|
|
||||||
.btn-custom {
|
|
||||||
background-color: #292929 !important;
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#515151", endColorstr="#282828");
|
|
||||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#515151), to(#282828));
|
|
||||||
background-image: -moz-linear-gradient(top, #515151, #282828);
|
|
||||||
background-image: -ms-linear-gradient(top, #515151, #282828);
|
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #515151), color-stop(100%, #282828));
|
|
||||||
background-image: -webkit-linear-gradient(top, #515151, #282828);
|
|
||||||
background-image: -o-linear-gradient(top, #515151, #282828);
|
|
||||||
background-image: linear-gradient(#515151, #282828);
|
|
||||||
border-color: #282828 #282828 #1f1f1f;
|
|
||||||
color: #fff !important;
|
|
||||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.26);
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
}
|
|
||||||
/* ===================
|
|
||||||
Page title bar
|
|
||||||
===================== */
|
|
||||||
h1.pageheader {
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: 20px;
|
|
||||||
font-family: "Arial Black", Tahoma, sans-serif;
|
|
||||||
margin: 8px;
|
|
||||||
margin-left: 22px;
|
|
||||||
}
|
|
||||||
/* ===================
|
|
||||||
Hero unit
|
|
||||||
===================== */
|
|
||||||
section.header {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
.hero-unit {
|
|
||||||
background-color: #292e33;
|
|
||||||
}
|
|
||||||
.hero-unit h5 {
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
/* ===================
|
|
||||||
Main content layout
|
|
||||||
===================== */
|
|
||||||
.contentblock {
|
|
||||||
margin-top: 20px;
|
|
||||||
border-width: 3px;
|
|
||||||
background-color: #eeeeee;
|
|
||||||
box-sizing: content-box;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
.section img {
|
|
||||||
margin: 15px 15px 15px 0;
|
|
||||||
border: 2px solid gray;
|
|
||||||
}
|
|
||||||
.admonition {
|
|
||||||
padding: 10px;
|
|
||||||
border: 1px solid grey;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
margin-top: 10px;
|
|
||||||
-webkit-border-radius: 4px;
|
|
||||||
-moz-border-radius: 4px;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
.admonition .admonition-title {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.admonition.note {
|
|
||||||
background-color: #f1ebba;
|
|
||||||
}
|
|
||||||
.admonition.warning {
|
|
||||||
background-color: #eed9af;
|
|
||||||
}
|
|
||||||
.admonition.danger {
|
|
||||||
background-color: #e9bcab;
|
|
||||||
}
|
|
||||||
/* ===================
|
|
||||||
left navigation
|
|
||||||
===================== */
|
|
||||||
.dotcloudsidebar {
|
|
||||||
float: left;
|
|
||||||
height: 100%;
|
|
||||||
top: 0px;
|
|
||||||
bottom: 0px;
|
|
||||||
position: relative;
|
|
||||||
min-height: 100%;
|
|
||||||
margin-top: 78px;
|
|
||||||
margin-bottom: 22px;
|
|
||||||
}
|
|
||||||
.sidebar {
|
|
||||||
font-weight: normal;
|
|
||||||
float: left;
|
|
||||||
/* min-height: 475px;*/
|
|
||||||
|
|
||||||
background: #ececec;
|
|
||||||
/* border-left: 1px solid #bbbbbb;*/
|
|
||||||
|
|
||||||
/* border-right: 1px solid #cccccc;*/
|
|
||||||
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.sidebar ul {
|
|
||||||
padding: 0px;
|
|
||||||
}
|
|
||||||
.sidebar ul li {
|
|
||||||
font-size: 14px;
|
|
||||||
list-style-type: none;
|
|
||||||
list-style-position: outside;
|
|
||||||
list-style-image: none;
|
|
||||||
margin-left: -25px;
|
|
||||||
padding: 0px;
|
|
||||||
}
|
|
||||||
.sidebar ul li a {
|
|
||||||
display: block;
|
|
||||||
color: #443331;
|
|
||||||
outline: 1px solid #dddddd;
|
|
||||||
padding: 12px 12px 10px 12px;
|
|
||||||
margin-top: 1px;
|
|
||||||
background-color: #d2d2d2;
|
|
||||||
}
|
|
||||||
.sidebar ul li .toctree-l1 {
|
|
||||||
font-size: larger;
|
|
||||||
}
|
|
||||||
.sidebar ul li .toctree-l1 a {
|
|
||||||
background-color: #dfdfdf;
|
|
||||||
}
|
|
||||||
.sidebar ul li .toctree-l1 .current {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.sidebar ul li .toctree-l2 a {
|
|
||||||
padding-left: 18px;
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
.sidebar ul li .toctree-l2 .current {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.sidebar ul li .toctree-l3 {
|
|
||||||
font-size: smaller;
|
|
||||||
}
|
|
||||||
.sidebar ul li .toctree-l3 a {
|
|
||||||
padding-left: 36px;
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
.sidebar ul li .toctree-l3 .current {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.brand img {
|
|
||||||
height: 38px;
|
|
||||||
margin-left: -6px;
|
|
||||||
}
|
|
||||||
.border-box {
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 20px;
|
|
||||||
background-color: #111188;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
.titlebar {
|
|
||||||
background-color: #000000;
|
|
||||||
margin-top: 0px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
min-height: 40px;
|
|
||||||
color: white;
|
|
||||||
padding-top: 8px;
|
|
||||||
padding-bottom: 8px;
|
|
||||||
}
|
|
||||||
.footer {
|
|
||||||
border-top: 2px solid black;
|
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 15px;
|
||||||
min-height: 40px;
|
|
||||||
padding-left: 8px;
|
|
||||||
padding-top: 8px;
|
|
||||||
padding-bottom: 8px;
|
|
||||||
}
|
}
|
||||||
/* This is the default */
|
div[class*='span'] {
|
||||||
.span6.with-padding {
|
-moz-box-sizing: border-box;
|
||||||
background-color: #111188;
|
box-sizing: border-box;
|
||||||
height: 200px;
|
|
||||||
color: white;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
}
|
||||||
#global {
|
.box {
|
||||||
min-height: 500px;
|
padding: 30px;
|
||||||
|
background-color: white;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
.paper {
|
||||||
|
background-color: white;
|
||||||
|
padding-top: 30px;
|
||||||
|
padding-bottom: 30px;
|
||||||
|
}
|
||||||
|
.copy-headline {
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
.box h1,
|
||||||
|
.box h2,
|
||||||
|
.box h3,
|
||||||
|
.box h4 {
|
||||||
|
margin-top: -5px;
|
||||||
|
}
|
||||||
|
.nested {
|
||||||
|
padding: 30px;
|
||||||
|
}
|
||||||
|
.box.div {
|
||||||
|
padding: 30px;
|
||||||
|
}
|
||||||
|
span.read-more {
|
||||||
|
margin-left: 15px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.forcetopalign {
|
||||||
|
margin-top: 15px !important;
|
||||||
|
}
|
||||||
|
.forcetopmargin {
|
||||||
|
margin-top: 23px !important;
|
||||||
|
}
|
||||||
|
.forceleftalign {
|
||||||
|
margin-left: 15px !important;
|
||||||
|
}
|
||||||
|
.forceleftmargin {
|
||||||
|
margin-left: 21px !important;
|
||||||
|
}
|
||||||
|
.textcenter {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.textright {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.textsmaller {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.modal-backdrop {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
/* generic page copy styles */
|
||||||
|
.copy-headline h1 {
|
||||||
|
font-size: 21px;
|
||||||
}
|
}
|
||||||
/* =======================
|
/* =======================
|
||||||
Row size
|
Sticky footer
|
||||||
======================= */
|
======================= */
|
||||||
.row1 {
|
html,
|
||||||
background-color: #999999;
|
body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
/* The html and body elements cannot have any padding or margin. */
|
||||||
|
|
||||||
|
}
|
||||||
|
/* Wrapper for page content to push down footer */
|
||||||
|
#wrap {
|
||||||
|
min-height: 100%;
|
||||||
|
height: auto !important;
|
||||||
|
height: 100%;
|
||||||
|
/* Negative indent footer by it's height */
|
||||||
|
|
||||||
|
margin: 0 auto -280px;
|
||||||
|
}
|
||||||
|
/* Set the fixed height of the footer here */
|
||||||
|
#push-the-footer,
|
||||||
|
#footer {
|
||||||
|
height: 280px;
|
||||||
|
}
|
||||||
|
.main-row {
|
||||||
|
padding-top: 50px;
|
||||||
|
}
|
||||||
|
#footer .footer {
|
||||||
|
margin-top: 160px;
|
||||||
|
}
|
||||||
|
#footer .footer .ligaturesymbols {
|
||||||
|
font-size: 30px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
#footer .footer .ligaturesymbols a {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
#footer .footer .footerlist h3,
|
||||||
|
#footer .footer .footerlist h4 {
|
||||||
|
/* correct the top alignment */
|
||||||
|
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
.footer-landscape-image {
|
||||||
|
position: absolute:
|
||||||
|
bottom: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
background-image: url('https://www.docker.io/static/img/website-footer_clean.svg');
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
height: 280px;
|
||||||
|
}
|
||||||
|
.main-row {
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
||||||
|
.main-content {
|
||||||
|
padding: 16px 18px inherit;
|
||||||
}
|
}
|
||||||
/* =======================
|
/* =======================
|
||||||
Social footer
|
Social footer
|
||||||
======================= */
|
======================= */
|
||||||
|
.social {
|
||||||
|
margin-left: 0px;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
.social .twitter,
|
.social .twitter,
|
||||||
.social .github,
|
.social .github,
|
||||||
.social .googleplus {
|
.social .googleplus {
|
||||||
background: url("../img/footer-links.png") no-repeat transparent;
|
background: url("https://www.docker.io/static/img/footer-links.png") no-repeat transparent;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -288,93 +213,160 @@ section.header {
|
||||||
.social .github {
|
.social .github {
|
||||||
background-position: -59px 2px;
|
background-position: -59px 2px;
|
||||||
}
|
}
|
||||||
#fork-us {
|
form table th {
|
||||||
/*font-family: 'Maven Pro';*/
|
vertical-align: top;
|
||||||
|
text-align: right;
|
||||||
/*font-weight: bold;*/
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
form .labeldd label {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
form .helptext {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
/*text-transform: uppercase;*/
|
margin-top: -4px;
|
||||||
|
margin-bottom: 10px;
|
||||||
display: block;
|
|
||||||
padding: 0px 1em;
|
|
||||||
height: 28px;
|
|
||||||
line-height: 28px;
|
|
||||||
background-color: #43484c;
|
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFFF6E56', endColorstr='#FFED4F35');
|
|
||||||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #747474), color-stop(100%, #43484c));
|
|
||||||
background-image: -webkit-linear-gradient(top, #747474 0%, #43484c 100%);
|
|
||||||
background-image: -moz-linear-gradient(top, #747474 0%, #43484c 100%);
|
|
||||||
background-image: -o-linear-gradient(top, #747474 0%, #43484c 100%);
|
|
||||||
background-image: linear-gradient(top, #747474 0%, #43484c 100%);
|
|
||||||
border: 1px solid #43484c;
|
|
||||||
-webkit-border-radius: 4px;
|
|
||||||
-moz-border-radius: 4px;
|
|
||||||
-ms-border-radius: 4px;
|
|
||||||
-o-border-radius: 4px;
|
|
||||||
border-radius: 4px;
|
|
||||||
-webkit-box-shadow: inset rgba(255, 255, 255, 0.17) 0 1px 1px;
|
|
||||||
-moz-box-shadow: inset rgba(255, 255, 255, 0.17) 0 1px 1px;
|
|
||||||
box-shadow: inset rgba(255, 255, 255, 0.17) 0 1px 1px;
|
|
||||||
margin: 8px;
|
|
||||||
}
|
}
|
||||||
#fork-us a {
|
form .fielddd input {
|
||||||
color: #faf2ee;
|
width: 250px;
|
||||||
text-shadow: rgba(0, 0, 0, 0.3) 0px 1px 0px;
|
|
||||||
}
|
}
|
||||||
|
form .error {
|
||||||
|
color: #a30000;
|
||||||
|
}
|
||||||
|
div.alert.alert-block {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
/* ======================= =======================
|
||||||
|
Documentation
|
||||||
|
========================= ========================= */
|
||||||
/* =======================
|
/* =======================
|
||||||
Media size overrides
|
Styles for the sidebar
|
||||||
======================= */
|
========================= */
|
||||||
/* Large desktop */
|
.page-title {
|
||||||
@media (min-width: 1200px) {
|
background-color: white;
|
||||||
.span6.with-padding {
|
border: 1px solid transparent;
|
||||||
background-color: #dc143c;
|
text-align: center;
|
||||||
width: 540px;
|
width: 100%;
|
||||||
padding: 15px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* Normal desktop */
|
.page-title h4 {
|
||||||
@media (min-width: 980px) and (max-width: 1199px) {
|
font-size: 20px;
|
||||||
.span6.with-padding {
|
|
||||||
background-color: #ee1111;
|
|
||||||
width: 440px;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* Portrait tablet to landscape and desktop */
|
.bs-docs-sidebar {
|
||||||
@media (min-width: 768px) and (max-width: 979px) {
|
padding-left: 5px;
|
||||||
body {
|
max-width: 100%;
|
||||||
padding-top: 0px;
|
box-sizing: border-box;
|
||||||
}
|
-moz-box-sizing: border-box;
|
||||||
.span6.with-padding {
|
margin-top: 18px;
|
||||||
background-color: #292e33;
|
|
||||||
width: 332px;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* Landscape phone to portrait tablet */
|
.bs-docs-sidebar ul {
|
||||||
@media (max-width: 767px) {
|
list-style: none;
|
||||||
body {
|
margin-left: 0px;
|
||||||
padding-top: 0px;
|
}
|
||||||
}
|
.bs-docs-sidebar .toctree-l2 > ul {
|
||||||
#global {
|
width: 100%;
|
||||||
/* TODO: Fix this to be relative to the navigation size */
|
}
|
||||||
|
.bs-docs-sidebar ul > li.toctree-l1.has-children {
|
||||||
}
|
background-image: url('../img/menu_arrow_right.gif');
|
||||||
#fork-us {
|
background-repeat: no-repeat;
|
||||||
|
background-position: 13px 13px;
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 0px 0px 0px 0px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.bs-docs-sidebar ul > li.toctree-l1.has-children.open {
|
||||||
|
background-image: url('../img/menu_arrow_down.gif');
|
||||||
|
}
|
||||||
|
.bs-docs-sidebar ul > li > a {
|
||||||
|
box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
width: 100%;
|
||||||
|
display: inline-block;
|
||||||
|
padding-top: 8px;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
padding-left: 35px;
|
||||||
|
padding-right: 20px;
|
||||||
|
font-size: 14px;
|
||||||
|
border-bottom: 1.5px solid #595959;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
.bs-docs-sidebar ul > li:first-child.active > a {
|
||||||
|
border-top: 1.5px solid #595959;
|
||||||
|
}
|
||||||
|
.bs-docs-sidebar ul > li:last-child > a {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
.bs-docs-sidebar ul > li:last-child.active > a {
|
||||||
|
border-bottom: 1.5px solid #595959;
|
||||||
|
}
|
||||||
|
.bs-docs-sidebar ul > li.active > a {
|
||||||
|
border-right: 1.5px solid #595959;
|
||||||
|
border-left: 1.5px solid #595959;
|
||||||
|
color: #394d54;
|
||||||
|
}
|
||||||
|
.bs-docs-sidebar ul > li:hover {
|
||||||
|
background-color: #e8e8e8;
|
||||||
|
}
|
||||||
|
.bs-docs-sidebar.toctree-l3 ul {
|
||||||
|
display: inherit;
|
||||||
|
margin-left: 15px;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
.bs-docs-sidebar .toctree-l3 a {
|
||||||
|
border: none;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 15px;
|
||||||
|
}
|
||||||
|
.bs-docs-sidebar ul > li > ul {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* Landscape phones and down */
|
.bs-docs-sidebar ul > li.current > ul {
|
||||||
@media (max-width: 480px) {
|
display: inline-block;
|
||||||
#nav-gettingstarted {
|
padding-left: 0px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.toctree-l2.current > a {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.toctree-l2.current {
|
||||||
|
border: 1.5px solid #595959;
|
||||||
|
color: #394d54;
|
||||||
|
}
|
||||||
|
/* =====================================
|
||||||
|
Styles for the floating version widget
|
||||||
|
====================================== */
|
||||||
|
.version-flyer {
|
||||||
|
position: fixed;
|
||||||
|
float: right;
|
||||||
|
right: 0;
|
||||||
|
bottom: 40px;
|
||||||
|
background-color: #E0E0E0;
|
||||||
|
border: 1px solid #88BABC;
|
||||||
|
padding: 5px;
|
||||||
|
font-size: larger;
|
||||||
|
}
|
||||||
|
.version-flyer .content {
|
||||||
|
padding-right: 45px;
|
||||||
|
margin-top: 7px;
|
||||||
|
margin-left: 7px;
|
||||||
|
background-image: url('../img/container3.png');
|
||||||
|
background-position: right center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
.version-flyer .alternative {
|
||||||
|
visibility: hidden;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* Misc fixes */
|
.version-flyer .active-slug {
|
||||||
table th {
|
visibility: visible;
|
||||||
text-align: left;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
.version-flyer:hover .alternative {
|
||||||
|
animation-duration: 1s;
|
||||||
|
display: inline-block;
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
/* =====================================
|
||||||
|
Styles for
|
||||||
|
====================================== */
|
||||||
h1:hover > a.headerlink,
|
h1:hover > a.headerlink,
|
||||||
h2:hover > a.headerlink,
|
h2:hover > a.headerlink,
|
||||||
h3:hover > a.headerlink,
|
h3:hover > a.headerlink,
|
||||||
|
@ -391,21 +383,29 @@ dt:hover > a.headerlink {
|
||||||
float: right;
|
float: right;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
/* =====================================
|
||||||
/* Swiftype style */
|
Miscellaneous information
|
||||||
|
====================================== */
|
||||||
#st-search-input {
|
.admonition.warning,
|
||||||
margin-right: 14px;
|
.admonition.note,
|
||||||
margin-left: 9px;
|
.admonition.seealso,
|
||||||
height: 19px;
|
.admonition.todo {
|
||||||
width: 120px;
|
border: 3px solid black;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 5px auto 10px;
|
||||||
}
|
}
|
||||||
#swiftype-img {
|
.admonition .admonition-title {
|
||||||
border: none;
|
font-size: larger;
|
||||||
width: 145px;
|
}
|
||||||
height: auto;
|
.admonition.warning {
|
||||||
margin: 0px auto;
|
border-color: #ac0004;
|
||||||
margin-left: 13px;
|
}
|
||||||
margin-top: -30px;
|
.admonition.note {
|
||||||
|
border-color: #cbc200;
|
||||||
|
}
|
||||||
|
.admonition.todo {
|
||||||
|
border-color: orange;
|
||||||
|
}
|
||||||
|
.admonition.seealso {
|
||||||
|
border-color: #23cb1f;
|
||||||
}
|
}
|
895
docs/theme/docker/static/css/main.less
vendored
|
@ -1,376 +1,337 @@
|
||||||
|
// Main CSS configuration file
|
||||||
|
// by Thatcher Peskens, thatcher@dotcloud.com
|
||||||
|
//
|
||||||
|
// Please note variables.less is customized to include custom font, background-color, and link colors.
|
||||||
|
|
||||||
|
|
||||||
/* ==========================================================================
|
|
||||||
Author's custom styles
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
@import "variables.less";
|
@import "variables.less";
|
||||||
|
|
||||||
@red: crimson;
|
// Variables for main.less
|
||||||
@lightblue: #118;
|
// -----------------------
|
||||||
@lightred: #e11;
|
|
||||||
@darkblue: #292E33;
|
|
||||||
|
|
||||||
@borderGray: #888;
|
@box-top-margin: 8px;
|
||||||
|
@box-padding-size: 30px;
|
||||||
|
@docker-background-color: #71AFC0;
|
||||||
|
@very-dark-sea-green: #394D54;
|
||||||
|
|
||||||
|
// Custom colors for Docker
|
||||||
|
// --------------------------
|
||||||
|
@gray-super-light: #F2F2F2;
|
||||||
|
@deep-red: #A30000;
|
||||||
|
@deep-blue: #1B2033;
|
||||||
|
@deep-green: #007035;
|
||||||
|
@link-blue: #213B8F;
|
||||||
|
|
||||||
|
|
||||||
.red {
|
.debug {
|
||||||
background-color: red;
|
border: 2px dotted red !important;
|
||||||
}
|
box-sizing: border-box;
|
||||||
.blue {
|
-moz-box-sizing: border-box;
|
||||||
background-color: blue;
|
|
||||||
}
|
|
||||||
.orange {
|
|
||||||
background-color: orange;
|
|
||||||
}
|
|
||||||
.gray {
|
|
||||||
background-color: grey;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Other custom colors for Docker
|
||||||
|
// --------------------------
|
||||||
|
|
||||||
|
// ** are defined in sources/less/variables **
|
||||||
|
//@import "bootstrap/variables.less";
|
||||||
|
|
||||||
|
|
||||||
|
// Styles generic for each and every page
|
||||||
|
// ----------------------------------- // -----------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
// moving body down to make place for fixed navigation
|
||||||
body {
|
body {
|
||||||
padding-top: 58px;
|
min-width: 940px;
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
font-family: @font-family-base;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
h1, h2, h3, h4 {
|
p a {
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
text-decoration: underline;
|
||||||
// font-weight: bold;
|
|
||||||
font-weight: 900;
|
&.btn {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===================
|
.brand.logo a {
|
||||||
Top navigation
|
text-decoration: none;
|
||||||
===================== */
|
}
|
||||||
|
|
||||||
.navbar {
|
// Styles for top navigation
|
||||||
z-index: 999;
|
// ----------------------------------
|
||||||
.nav {
|
.navbar .navbar-inner {
|
||||||
// float: right;
|
padding-left: 0px;
|
||||||
|
padding-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
li a{
|
.navbar .nav {
|
||||||
padding: 22px 15px 22px;
|
li a {
|
||||||
|
padding: ((@navbar-height - @line-height-base) / 2) 17px ((@navbar-height - @line-height-base) / 2);
|
||||||
|
color: #777777;
|
||||||
|
text-decoration: none;
|
||||||
|
text-shadow: 0 1px 0 #f2f2f2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.navbar .nav > li {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-underline {
|
||||||
|
height: 6px;
|
||||||
|
background-color: @docker-background-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-login {
|
||||||
|
li {
|
||||||
|
a {
|
||||||
|
color: white;
|
||||||
|
padding: 10px 15px 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
background-color: white;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-dotcloud .container {
|
|
||||||
border-bottom: 2px @black solid;
|
|
||||||
|
.navbar .brand {
|
||||||
|
margin-left: 0px;
|
||||||
|
float: left;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-inner {
|
||||||
|
min-height: 70px;
|
||||||
|
padding-left: 20px;
|
||||||
|
padding-right: 20px;
|
||||||
|
background-color: #ededed;
|
||||||
|
background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));
|
||||||
|
background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);
|
||||||
|
background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);
|
||||||
|
background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);
|
||||||
|
border: 1px solid #c7c7c7;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
||||||
|
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
||||||
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand.logo a {
|
||||||
|
color: white;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
// background-color: #A30000;
|
||||||
|
// color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inline-icon {
|
.inline-icon {
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Bootstrap elements
|
||||||
* Responsive YouTube, Vimeo, Embed, and HTML5 Videos with CSS
|
// ----------------------------------
|
||||||
* http://www.jonsuh.com
|
|
||||||
*
|
|
||||||
* Copyright (c) 2012 Jonathan Suh
|
|
||||||
* Free to use under the MIT license.
|
|
||||||
* http://www.opensource.org/licenses/mit-license.php
|
|
||||||
*/
|
|
||||||
|
|
||||||
.js-video {
|
.row {
|
||||||
height: 0;
|
|
||||||
padding-top: 25px;
|
|
||||||
padding-bottom: 67.5%;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.js-video.vimeo {
|
|
||||||
padding-top: 0;
|
|
||||||
}
|
|
||||||
.js-video.widescreen {
|
|
||||||
padding-bottom: 57.25%;
|
|
||||||
}
|
|
||||||
.js-video embed, .js-video iframe, .js-video object, .js-video video {
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Responsive */
|
|
||||||
@media (max-width: 767px) {
|
|
||||||
.js-video {
|
|
||||||
padding-top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* button style from http://charliepark.org/bootstrap_buttons/ */
|
|
||||||
.btn-custom {
|
|
||||||
background-color: hsl(0, 0%, 16%) !important;
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#515151", endColorstr="#282828");
|
|
||||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#515151), to(#282828));
|
|
||||||
background-image: -moz-linear-gradient(top, #515151, #282828);
|
|
||||||
background-image: -ms-linear-gradient(top, #515151, #282828);
|
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #515151), color-stop(100%, #282828));
|
|
||||||
background-image: -webkit-linear-gradient(top, #515151, #282828);
|
|
||||||
background-image: -o-linear-gradient(top, #515151, #282828);
|
|
||||||
background-image: linear-gradient(#515151, #282828);
|
|
||||||
border-color: #282828 #282828 hsl(0, 0%, 12%);
|
|
||||||
color: #fff !important;
|
|
||||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.26);
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ===================
|
|
||||||
Page title bar
|
|
||||||
===================== */
|
|
||||||
|
|
||||||
h1.pageheader {
|
|
||||||
color: @white;
|
|
||||||
font-size: 20px;
|
|
||||||
font-family: "Arial Black", Tahoma, sans-serif;
|
|
||||||
margin: 8px;
|
|
||||||
margin-left: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ===================
|
|
||||||
Hero unit
|
|
||||||
===================== */
|
|
||||||
|
|
||||||
section.header {
|
|
||||||
margin-top:0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-unit {
|
|
||||||
background-color: @darkblue;
|
|
||||||
|
|
||||||
h5 {
|
|
||||||
color: @white;
|
|
||||||
}
|
|
||||||
.subtitle {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ===================
|
|
||||||
Main content layout
|
|
||||||
===================== */
|
|
||||||
|
|
||||||
.contentblock {
|
|
||||||
margin-top: 20px;
|
|
||||||
border-width: 3px;
|
|
||||||
// border-color: #E00;
|
|
||||||
// border-style:solid;
|
|
||||||
// border-color: @borderGray;
|
|
||||||
// box-sizing: border-box;
|
|
||||||
background-color: @grayLighter;
|
|
||||||
box-sizing: content-box;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section img {
|
|
||||||
margin: 15px 15px 15px 0;
|
|
||||||
border: 2px solid gray;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admonition {
|
|
||||||
padding: 10px;
|
|
||||||
border: 1px solid grey;
|
|
||||||
|
|
||||||
margin-bottom: 10px;
|
|
||||||
margin-top: 10px;
|
|
||||||
|
|
||||||
-webkit-border-radius: 4px;
|
|
||||||
-moz-border-radius: 4px;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admonition .admonition-title {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admonition.note {
|
|
||||||
background-color: rgb(241, 235, 186);
|
|
||||||
}
|
|
||||||
|
|
||||||
.admonition.warning {
|
|
||||||
background-color: rgb(238, 217, 175);
|
|
||||||
}
|
|
||||||
|
|
||||||
.admonition.danger {
|
|
||||||
background-color: rgb(233, 188, 171);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ===================
|
|
||||||
left navigation
|
|
||||||
===================== */
|
|
||||||
|
|
||||||
.dotcloudsidebar {
|
|
||||||
// background-color: #ee3;
|
|
||||||
// border: 1px red dotted;
|
|
||||||
float: left;
|
|
||||||
height: 100%;
|
|
||||||
top: 0px;
|
|
||||||
bottom: 0px;
|
|
||||||
position: relative;
|
|
||||||
// margin: 0px;
|
|
||||||
min-height: 100%;
|
|
||||||
margin-top: 78px;
|
|
||||||
margin-bottom: 22px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar {
|
|
||||||
// font-family: "Maven Pro";
|
|
||||||
font-weight: normal;
|
|
||||||
// margin-top: 38px;
|
|
||||||
float: left;
|
|
||||||
// width: 220px;
|
|
||||||
/* min-height: 475px;*/
|
|
||||||
// margin-bottom: 28px;
|
|
||||||
// padding-bottom: 120px;
|
|
||||||
background: #ececec;
|
|
||||||
/* border-left: 1px solid #bbbbbb;*/
|
|
||||||
/* border-right: 1px solid #cccccc;*/
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ul {
|
|
||||||
padding: 0px;
|
|
||||||
li {
|
|
||||||
font-size: 14px;
|
|
||||||
// list-style: none;
|
|
||||||
list-style-type: none;
|
|
||||||
list-style-position: outside;
|
|
||||||
list-style-image: none;
|
|
||||||
margin-left: -25px;
|
|
||||||
padding: 0px;
|
|
||||||
|
|
||||||
a {
|
|
||||||
display: block;
|
|
||||||
color: #443331;
|
|
||||||
outline: 1px solid #dddddd;
|
|
||||||
padding: 12px 12px 10px 12px;
|
|
||||||
margin-top: 1px;
|
|
||||||
background-color: #d2d2d2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toctree-l1, .toctree-l2 {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.toctree-l1 {
|
|
||||||
font-size: larger;
|
|
||||||
a {
|
|
||||||
background-color: rgb(223, 223, 223);
|
|
||||||
}
|
|
||||||
.current {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
// margin-left: -25px;
|
|
||||||
}
|
|
||||||
.toctree-l2 {
|
|
||||||
a {
|
|
||||||
padding-left: 18px;
|
|
||||||
background-color: rgb(255, 255, 255);
|
|
||||||
}
|
|
||||||
.current {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.toctree-l3 {
|
|
||||||
font-size: smaller;
|
|
||||||
a {
|
|
||||||
padding-left: 36px;
|
|
||||||
background-color: rgb(255, 255, 255);
|
|
||||||
}
|
|
||||||
.current {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.brand img {
|
|
||||||
height: 38px;
|
|
||||||
margin-left: -6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.border-box {
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 20px;
|
|
||||||
background-color: @lightblue;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.titlebar {
|
|
||||||
background-color: @black;
|
|
||||||
margin-top: 0px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
min-height: 40px;
|
|
||||||
color: white;
|
|
||||||
// box-sizing: border-box;
|
|
||||||
padding-top: 8px;
|
|
||||||
padding-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
border-top: 2px solid black;
|
|
||||||
|
|
||||||
// background-color: #d2d2d2;
|
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
min-height: 40px;
|
.container {
|
||||||
|
// background-color: green;
|
||||||
|
}
|
||||||
|
|
||||||
padding-left: 8px;
|
// Styles on blocks of content
|
||||||
padding-top: 8px;
|
// ----------------------------------
|
||||||
padding-bottom: 8px;
|
|
||||||
|
// everything which is a block should have box-sizing: border-box;
|
||||||
|
|
||||||
|
div[class*='span']
|
||||||
|
{
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Box for making white with a border, and some nice spacings
|
||||||
/* This is the default */
|
.box {
|
||||||
.span6.with-padding {
|
padding: @box-padding-size;
|
||||||
background-color: @lightblue;
|
background-color: white;
|
||||||
height: 200px;
|
margin-top: @box-top-margin;
|
||||||
color: white;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#global {
|
.paper {
|
||||||
min-height: 500px;
|
background-color: white;
|
||||||
|
padding-top: 30px;
|
||||||
|
padding-bottom: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.copy-headline {
|
||||||
|
margin-top: 0px;
|
||||||
|
// border-bottom: 1.2px solid @veryDarkSeaGreen;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
h1, h2, h3, h4 {
|
||||||
|
margin-top: -5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.nested {
|
||||||
|
padding: @box-padding-size;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box.div {
|
||||||
|
padding: @box-padding-size;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.read-more {
|
||||||
|
margin-left: 15px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// set a top margin of @box-top-margin + 8 px to make it show a margin
|
||||||
|
//instead of the div being flush against the side. Typically only
|
||||||
|
// required for a stacked div in a column, w.o. using row.
|
||||||
|
.forcetopalign {
|
||||||
|
margin-top: 15px !important;
|
||||||
|
}
|
||||||
|
.forcetopmargin {
|
||||||
|
margin-top: 23px !important;
|
||||||
|
}
|
||||||
|
.forceleftalign {
|
||||||
|
margin-left: 15px !important;
|
||||||
|
}
|
||||||
|
.forceleftmargin {
|
||||||
|
margin-left: 21px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// simple text aligns
|
||||||
|
.textcenter {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textright {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textsmaller {
|
||||||
|
font-size: @font-size-small;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-backdrop {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* generic page copy styles */
|
||||||
|
|
||||||
|
.copy-headline h1 {
|
||||||
|
font-size: 21px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* =======================
|
/* =======================
|
||||||
Row size
|
Sticky footer
|
||||||
======================= */
|
======================= */
|
||||||
|
|
||||||
.row1 {
|
@sticky-footer-height: 280px;
|
||||||
background-color: @grayLight;
|
|
||||||
|
html,
|
||||||
|
body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
/* The html and body elements cannot have any padding or margin. */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Wrapper for page content to push down footer */
|
||||||
|
#wrap {
|
||||||
|
min-height: 100%;
|
||||||
|
height: auto !important;
|
||||||
|
height: 100%;
|
||||||
|
/* Negative indent footer by it's height */
|
||||||
|
margin: 0 auto -@sticky-footer-height;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set the fixed height of the footer here */
|
||||||
|
#push-the-footer,
|
||||||
|
#footer {
|
||||||
|
height: @sticky-footer-height;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footer {
|
||||||
|
// margin-bottom: -60px;
|
||||||
|
// margin-top: 160px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-row {
|
||||||
|
padding-top: @navbar-height;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Styles on the footer
|
||||||
|
// ----------------------------------
|
||||||
|
|
||||||
|
//
|
||||||
|
#footer .footer {
|
||||||
|
margin-top: 160px;
|
||||||
|
.ligaturesymbols {
|
||||||
|
font-size: 30px;
|
||||||
|
color: black;
|
||||||
|
a {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerlist {
|
||||||
|
h3, h4 {
|
||||||
|
/* correct the top alignment */
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-landscape-image {
|
||||||
|
position: absolute:
|
||||||
|
bottom: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
background-image: url('https://www.docker.io/static/img/website-footer_clean.svg');
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
height: @sticky-footer-height;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-row {
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-content {
|
||||||
|
padding: 16px 18px inherit;
|
||||||
|
}
|
||||||
|
|
||||||
/* =======================
|
/* =======================
|
||||||
Social footer
|
Social footer
|
||||||
======================= */
|
======================= */
|
||||||
|
|
||||||
|
.social {
|
||||||
|
margin-left: 0px;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
.social .twitter, .social .github, .social .googleplus {
|
.social .twitter, .social .github, .social .googleplus {
|
||||||
background: url("../img/footer-links.png") no-repeat transparent;
|
background: url("https://www.docker.io/static/img/footer-links.png") no-repeat transparent;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -387,107 +348,219 @@ section.header {
|
||||||
background-position: -59px 2px;
|
background-position: -59px 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Styles on the forms
|
||||||
|
// ----------------------------------
|
||||||
|
|
||||||
#fork-us {
|
form table {
|
||||||
/*font-family: 'Maven Pro';*/
|
th {
|
||||||
/*font-weight: bold;*/
|
vertical-align: top;
|
||||||
font-size: 12px;
|
text-align: right;
|
||||||
/*text-transform: uppercase;*/
|
white-space: nowrap;
|
||||||
display: block;
|
|
||||||
padding: 0px 1em;
|
|
||||||
height: 28px;
|
|
||||||
line-height: 28px;
|
|
||||||
background-color: #43484c;
|
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFFF6E56', endColorstr='#FFED4F35');
|
|
||||||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #747474), color-stop(100%, #43484c));
|
|
||||||
background-image: -webkit-linear-gradient(top, #747474 0%, #43484c 100%);
|
|
||||||
background-image: -moz-linear-gradient(top, #747474 0%, #43484c 100%);
|
|
||||||
background-image: -o-linear-gradient(top, #747474 0%, #43484c 100%);
|
|
||||||
background-image: linear-gradient(top, #747474 0%, #43484c 100%);
|
|
||||||
border: 1px solid #43484c;
|
|
||||||
-webkit-border-radius: 4px;
|
|
||||||
-moz-border-radius: 4px;
|
|
||||||
-ms-border-radius: 4px;
|
|
||||||
-o-border-radius: 4px;
|
|
||||||
border-radius: 4px;
|
|
||||||
-webkit-box-shadow: inset rgba(255, 255, 255, 0.17) 0 1px 1px;
|
|
||||||
-moz-box-shadow: inset rgba(255, 255, 255, 0.17) 0 1px 1px;
|
|
||||||
box-shadow: inset rgba(255, 255, 255, 0.17) 0 1px 1px;
|
|
||||||
margin: 8px;
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #faf2ee;
|
|
||||||
text-shadow: rgba(0, 0, 0, 0.3) 0px 1px 0px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
.labeldd label {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helptext {
|
||||||
|
font-size: @font-size-small;
|
||||||
|
margin-top: -4px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fielddd input {
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
color: @deep-red;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type=submit] {
|
||||||
|
// margin-top: -8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
div.alert.alert-block {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ======================= =======================
|
||||||
|
Documentation
|
||||||
|
========================= ========================= */
|
||||||
|
|
||||||
|
|
||||||
/* =======================
|
/* =======================
|
||||||
Media size overrides
|
Styles for the sidebar
|
||||||
======================= */
|
========================= */
|
||||||
|
|
||||||
/* Large desktop */
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
.span6.with-padding {
|
|
||||||
background-color: @red;
|
|
||||||
|
|
||||||
width: (@gridColumnWidth1200 * 6) + (@gridGutterWidth1200 * 5) - @gridGutterWidth1200;
|
@sidebar-navigation-border: 1.5px solid #595959;
|
||||||
padding: @gridGutterWidth1200/2;
|
@sidebar-navigation-width: 225px;
|
||||||
|
|
||||||
|
|
||||||
|
.page-title {
|
||||||
|
// border-bottom: 1px solid #bbbbbb;
|
||||||
|
background-color: white;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
h4 {
|
||||||
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Normal desktop */
|
.bs-docs-sidebar {
|
||||||
@media (min-width: 980px) and (max-width: 1199px) {
|
padding-left: 5px;
|
||||||
.span6.with-padding {
|
max-width: 100%;
|
||||||
background-color: @lightred;
|
box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
margin-top: 18px;
|
||||||
|
|
||||||
width: (@gridColumnWidth * 6) + (@gridGutterWidth * 5) - @gridGutterWidth;
|
ul {
|
||||||
padding: @gridGutterWidth/2;
|
list-style: none;
|
||||||
|
margin-left: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
.toctree-l2 > ul {
|
||||||
|
width: 100%;
|
||||||
/* Portrait tablet to landscape and desktop */
|
|
||||||
@media (min-width: 768px) and (max-width: 979px) {
|
|
||||||
body {
|
|
||||||
padding-top: 0px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul > li {
|
||||||
|
&.toctree-l1.has-children {
|
||||||
|
background-image: url('../img/menu_arrow_right.gif');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: 13px 13px;
|
||||||
|
list-style-type: none;
|
||||||
|
// margin-left: px;
|
||||||
|
padding: 0px 0px 0px 0px;
|
||||||
|
vertical-align: middle;
|
||||||
|
|
||||||
.span6.with-padding {
|
&.open {
|
||||||
background-color: @darkblue;
|
background-image: url('../img/menu_arrow_down.gif');
|
||||||
|
}
|
||||||
width: (@gridColumnWidth768 * 6) + (@gridGutterWidth768 * 5) - @gridGutterWidth768;
|
|
||||||
padding: @gridGutterWidth768/2;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Landscape phone to portrait tablet */
|
& > a {
|
||||||
@media (max-width: 767px) {
|
box-sizing: border-box;
|
||||||
body {
|
-moz-box-sizing: border-box;
|
||||||
padding-top: 0px;
|
width: 100%;
|
||||||
|
display:inline-block;
|
||||||
|
padding-top: 8px;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
padding-left: 35px;
|
||||||
|
padding-right: 20px;
|
||||||
|
font-size: @font-size-base;
|
||||||
|
border-bottom: @sidebar-navigation-border;
|
||||||
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
#global {
|
|
||||||
/* TODO: Fix this to be relative to the navigation size */
|
&:first-child.active > a {
|
||||||
// padding-top: 600px;
|
border-top: @sidebar-navigation-border;
|
||||||
}
|
}
|
||||||
#fork-us {
|
|
||||||
|
&:last-child > a {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child.active > a {
|
||||||
|
border-bottom: @sidebar-navigation-border;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active > a {
|
||||||
|
border-right: @sidebar-navigation-border;
|
||||||
|
border-left: @sidebar-navigation-border;
|
||||||
|
color: @very-dark-sea-green;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #e8e8e8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.toctree-l3 ul {
|
||||||
|
display: inherit;
|
||||||
|
|
||||||
|
margin-left: 15px;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toctree-l3 a {
|
||||||
|
border: none;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul > li > ul {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
ul > li.current > ul {
|
||||||
/* Landscape phones and down */
|
display: inline-block;
|
||||||
@media (max-width: 480px) {
|
padding-left: 0px;
|
||||||
#nav-gettingstarted {
|
width: 100%;
|
||||||
display: none;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Misc fixes */
|
.toctree-l2 {
|
||||||
table th {
|
&.current > a {
|
||||||
text-align: left;
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
&.current {
|
||||||
|
border: 1.5px solid #595959;
|
||||||
|
color: #394d54;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* =====================================
|
||||||
|
Styles for the floating version widget
|
||||||
|
====================================== */
|
||||||
|
|
||||||
|
.version-flyer {
|
||||||
|
position: fixed;
|
||||||
|
float: right;
|
||||||
|
right: 0;
|
||||||
|
bottom: 40px;
|
||||||
|
background-color: #E0E0E0;
|
||||||
|
border: 1px solid #88BABC;
|
||||||
|
padding: 5px;
|
||||||
|
font-size: larger;
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding-right: 45px;
|
||||||
|
margin-top: 7px;
|
||||||
|
margin-left: 7px;
|
||||||
|
// display: inline-block;
|
||||||
|
background-image: url('../img/container3.png');
|
||||||
|
background-position: right center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alternative {
|
||||||
|
visibility: hidden;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.active-slug {
|
||||||
|
visibility: visible;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover .alternative {
|
||||||
|
animation-duration: 1s;
|
||||||
|
display: inline-block;
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* =====================================
|
||||||
|
Styles for
|
||||||
|
====================================== */
|
||||||
|
|
||||||
h1:hover > a.headerlink,
|
h1:hover > a.headerlink,
|
||||||
h2:hover > a.headerlink,
|
h2:hover > a.headerlink,
|
||||||
h3:hover > a.headerlink,
|
h3:hover > a.headerlink,
|
||||||
|
@ -505,3 +578,37 @@ dt:hover > a.headerlink {
|
||||||
float: right;
|
float: right;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* =====================================
|
||||||
|
Miscellaneous information
|
||||||
|
====================================== */
|
||||||
|
|
||||||
|
.admonition {
|
||||||
|
&.warning, &.note, &.seealso, &.todo {
|
||||||
|
border: 3px solid black;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 5px auto 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admonition-title {
|
||||||
|
font-size: larger;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.warning {
|
||||||
|
border-color: #ac0004;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.note {
|
||||||
|
border-color: #cbc200;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.todo {
|
||||||
|
border-color: orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.seealso {
|
||||||
|
border-color: #23cb1f;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
707
docs/theme/docker/static/css/variables.less
vendored
Executable file → Normal file
|
@ -9,128 +9,175 @@
|
||||||
|
|
||||||
// Grays
|
// Grays
|
||||||
// -------------------------
|
// -------------------------
|
||||||
@black: #000;
|
|
||||||
@grayDarker: #222;
|
|
||||||
@grayDark: #333;
|
|
||||||
@gray: #555;
|
|
||||||
@grayLight: #999;
|
|
||||||
@grayLighter: #eee;
|
|
||||||
@white: #fff;
|
|
||||||
|
|
||||||
|
@gray-darker: lighten(#000, 13.5%); // #222
|
||||||
|
@gray-dark: lighten(#000, 20%); // #333
|
||||||
|
@gray: lighten(#000, 33.5%); // #555
|
||||||
|
@gray-light: lighten(#000, 60%); // #999
|
||||||
|
@gray-lighter: lighten(#000, 93.5%); // #eee
|
||||||
|
|
||||||
// Accent colors
|
// Brand colors
|
||||||
// -------------------------
|
// -------------------------
|
||||||
@blue: #049cdb;
|
|
||||||
@blueDark: #0064cd;
|
|
||||||
@green: #46a546;
|
|
||||||
@red: #9d261d;
|
|
||||||
@yellow: #ffc40d;
|
|
||||||
@orange: #f89406;
|
|
||||||
@pink: #c3325f;
|
|
||||||
@purple: #7a43b6;
|
|
||||||
|
|
||||||
|
@brand-primary: #428bca;
|
||||||
|
@brand-success: #5cb85c;
|
||||||
|
@brand-warning: #f0ad4e;
|
||||||
|
@brand-danger: #d9534f;
|
||||||
|
@brand-info: #5bc0de;
|
||||||
|
|
||||||
// Scaffolding
|
// Scaffolding
|
||||||
// -------------------------
|
// -------------------------
|
||||||
@bodyBackground: @white;
|
|
||||||
@textColor: @grayDark;
|
|
||||||
|
|
||||||
|
@body-bg: #fff;
|
||||||
|
@text-color: @gray-dark;
|
||||||
|
|
||||||
// Links
|
// Links
|
||||||
// -------------------------
|
// -------------------------
|
||||||
@linkColor: #08c;
|
|
||||||
@linkColorHover: darken(@linkColor, 15%);
|
|
||||||
|
|
||||||
|
@link-color: @brand-primary;
|
||||||
|
@link-hover-color: darken(@link-color, 15%);
|
||||||
|
|
||||||
// Typography
|
// Typography
|
||||||
// -------------------------
|
// -------------------------
|
||||||
@sansFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
||||||
@serifFontFamily: Georgia, "Times New Roman", Times, serif;
|
|
||||||
@monoFontFamily: Monaco, Menlo, Consolas, "Courier New", monospace;
|
|
||||||
|
|
||||||
@baseFontSize: 14px;
|
@font-family-sans-serif: "Cabin", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
@baseFontFamily: @sansFontFamily;
|
@font-family-serif: Georgia, "Times New Roman", Times, serif;
|
||||||
@baseLineHeight: 20px;
|
@font-family-monospace: Monaco, Menlo, Consolas, "Courier New", monospace;
|
||||||
@altFontFamily: @serifFontFamily;
|
@font-family-base: @font-family-sans-serif;
|
||||||
|
|
||||||
@headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily
|
@font-size-base: 14px;
|
||||||
@headingsFontWeight: bold; // instead of browser default, bold
|
@font-size-large: ceil(@font-size-base * 1.25); // ~18px
|
||||||
@headingsColor: inherit; // empty to use BS default, @textColor
|
@font-size-small: ceil(@font-size-base * 0.85); // ~12px
|
||||||
|
|
||||||
|
@line-height-base: 1.428571429; // 20/14
|
||||||
|
@line-height-computed: floor(@font-size-base * @line-height-base); // ~20px
|
||||||
|
|
||||||
// Component sizing
|
@headings-font-family: @font-family-base;
|
||||||
|
@headings-font-weight: 500;
|
||||||
|
@headings-line-height: 1.1;
|
||||||
|
|
||||||
|
// Iconography
|
||||||
// -------------------------
|
// -------------------------
|
||||||
// Based on 14px font-size and 20px line-height
|
|
||||||
|
|
||||||
@fontSizeLarge: @baseFontSize * 1.25; // ~18px
|
@icon-font-path: "../fonts/";
|
||||||
@fontSizeSmall: @baseFontSize * 0.85; // ~12px
|
@icon-font-name: "glyphicons-halflings-regular";
|
||||||
@fontSizeMini: @baseFontSize * 0.75; // ~11px
|
|
||||||
|
|
||||||
@paddingLarge: 11px 19px; // 44px
|
|
||||||
@paddingSmall: 2px 10px; // 26px
|
|
||||||
@paddingMini: 0 6px; // 22px
|
|
||||||
|
|
||||||
@baseBorderRadius: 4px;
|
// Components
|
||||||
@borderRadiusLarge: 6px;
|
// -------------------------
|
||||||
@borderRadiusSmall: 3px;
|
// Based on 14px font-size and 1.428 line-height (~20px to start)
|
||||||
|
|
||||||
|
@padding-base-vertical: 6px;
|
||||||
|
@padding-base-horizontal: 12px;
|
||||||
|
|
||||||
|
@padding-large-vertical: 10px;
|
||||||
|
@padding-large-horizontal: 16px;
|
||||||
|
|
||||||
|
@padding-small-vertical: 5px;
|
||||||
|
@padding-small-horizontal: 10px;
|
||||||
|
|
||||||
|
@line-height-large: 1.33;
|
||||||
|
@line-height-small: 1.5;
|
||||||
|
|
||||||
|
@border-radius-base: 4px;
|
||||||
|
@border-radius-large: 6px;
|
||||||
|
@border-radius-small: 3px;
|
||||||
|
|
||||||
|
@component-active-bg: @brand-primary;
|
||||||
|
|
||||||
|
@caret-width-base: 4px;
|
||||||
|
@caret-width-large: 5px;
|
||||||
|
|
||||||
// Tables
|
// Tables
|
||||||
// -------------------------
|
// -------------------------
|
||||||
@tableBackground: transparent; // overall background-color
|
|
||||||
@tableBackgroundAccent: #f9f9f9; // for striping
|
@table-cell-padding: 8px;
|
||||||
@tableBackgroundHover: #f5f5f5; // for hover
|
@table-condensed-cell-padding: 5px;
|
||||||
@tableBorder: #ddd; // table and cell border
|
|
||||||
|
@table-bg: transparent; // overall background-color
|
||||||
|
@table-bg-accent: #f9f9f9; // for striping
|
||||||
|
@table-bg-hover: #f5f5f5;
|
||||||
|
@table-bg-active: @table-bg-hover;
|
||||||
|
|
||||||
|
@table-border-color: #ddd; // table and cell border
|
||||||
|
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
// -------------------------
|
// -------------------------
|
||||||
@btnBackground: @white;
|
|
||||||
@btnBackgroundHighlight: darken(@white, 10%);
|
|
||||||
@btnBorder: #ccc;
|
|
||||||
|
|
||||||
@btnPrimaryBackground: @linkColor;
|
@btn-font-weight: normal;
|
||||||
@btnPrimaryBackgroundHighlight: spin(@btnPrimaryBackground, 20%);
|
|
||||||
|
|
||||||
@btnInfoBackground: #5bc0de;
|
@btn-default-color: #333;
|
||||||
@btnInfoBackgroundHighlight: #2f96b4;
|
@btn-default-bg: #fff;
|
||||||
|
@btn-default-border: #ccc;
|
||||||
|
|
||||||
@btnSuccessBackground: #62c462;
|
@btn-primary-color: #fff;
|
||||||
@btnSuccessBackgroundHighlight: #51a351;
|
@btn-primary-bg: @brand-primary;
|
||||||
|
@btn-primary-border: darken(@btn-primary-bg, 5%);
|
||||||
|
|
||||||
@btnWarningBackground: lighten(@orange, 15%);
|
@btn-success-color: #fff;
|
||||||
@btnWarningBackgroundHighlight: @orange;
|
@btn-success-bg: @brand-success;
|
||||||
|
@btn-success-border: darken(@btn-success-bg, 5%);
|
||||||
|
|
||||||
@btnDangerBackground: #ee5f5b;
|
@btn-warning-color: #fff;
|
||||||
@btnDangerBackgroundHighlight: #bd362f;
|
@btn-warning-bg: @brand-warning;
|
||||||
|
@btn-warning-border: darken(@btn-warning-bg, 5%);
|
||||||
|
|
||||||
@btnInverseBackground: #444;
|
@btn-danger-color: #fff;
|
||||||
@btnInverseBackgroundHighlight: @grayDarker;
|
@btn-danger-bg: @brand-danger;
|
||||||
|
@btn-danger-border: darken(@btn-danger-bg, 5%);
|
||||||
|
|
||||||
|
@btn-info-color: #fff;
|
||||||
|
@btn-info-bg: @brand-info;
|
||||||
|
@btn-info-border: darken(@btn-info-bg, 5%);
|
||||||
|
|
||||||
|
@btn-link-disabled-color: @gray-light;
|
||||||
|
|
||||||
|
|
||||||
// Forms
|
// Forms
|
||||||
// -------------------------
|
// -------------------------
|
||||||
@inputBackground: @white;
|
|
||||||
@inputBorder: #ccc;
|
@input-bg: #fff;
|
||||||
@inputBorderRadius: @baseBorderRadius;
|
@input-bg-disabled: @gray-lighter;
|
||||||
@inputDisabledBackground: @grayLighter;
|
|
||||||
@formActionsBackground: #f5f5f5;
|
@input-color: @gray;
|
||||||
@inputHeight: @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border
|
@input-border: #ccc;
|
||||||
|
@input-border-radius: @border-radius-base;
|
||||||
|
@input-border-focus: #66afe9;
|
||||||
|
|
||||||
|
@input-color-placeholder: @gray-light;
|
||||||
|
|
||||||
|
@input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2);
|
||||||
|
@input-height-large: (floor(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
|
||||||
|
@input-height-small: (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
|
||||||
|
|
||||||
|
@legend-color: @gray-dark;
|
||||||
|
@legend-border-color: #e5e5e5;
|
||||||
|
|
||||||
|
@input-group-addon-bg: @gray-lighter;
|
||||||
|
@input-group-addon-border-color: @input-border;
|
||||||
|
|
||||||
|
|
||||||
// Dropdowns
|
// Dropdowns
|
||||||
// -------------------------
|
// -------------------------
|
||||||
@dropdownBackground: @white;
|
|
||||||
@dropdownBorder: rgba(0,0,0,.2);
|
|
||||||
@dropdownDividerTop: #e5e5e5;
|
|
||||||
@dropdownDividerBottom: @white;
|
|
||||||
|
|
||||||
@dropdownLinkColor: @grayDark;
|
@dropdown-bg: #fff;
|
||||||
@dropdownLinkColorHover: @white;
|
@dropdown-border: rgba(0,0,0,.15);
|
||||||
@dropdownLinkColorActive: @white;
|
@dropdown-fallback-border: #ccc;
|
||||||
|
@dropdown-divider-bg: #e5e5e5;
|
||||||
|
|
||||||
@dropdownLinkBackgroundActive: @linkColor;
|
@dropdown-link-active-color: #fff;
|
||||||
@dropdownLinkBackgroundHover: @dropdownLinkBackgroundActive;
|
@dropdown-link-active-bg: @component-active-bg;
|
||||||
|
|
||||||
|
@dropdown-link-color: @gray-dark;
|
||||||
|
@dropdown-link-hover-color: #fff;
|
||||||
|
@dropdown-link-hover-bg: @dropdown-link-active-bg;
|
||||||
|
|
||||||
|
@dropdown-link-disabled-color: @gray-light;
|
||||||
|
|
||||||
|
@dropdown-header-color: @gray-light;
|
||||||
|
|
||||||
|
@dropdown-caret-color: #000;
|
||||||
|
|
||||||
|
|
||||||
// COMPONENT VARIABLES
|
// COMPONENT VARIABLES
|
||||||
|
@ -141,161 +188,435 @@
|
||||||
// -------------------------
|
// -------------------------
|
||||||
// Used for a bird's eye view of components dependent on the z-axis
|
// Used for a bird's eye view of components dependent on the z-axis
|
||||||
// Try to avoid customizing these :)
|
// Try to avoid customizing these :)
|
||||||
@zindexDropdown: 1000;
|
|
||||||
@zindexPopover: 1010;
|
@zindex-navbar: 1000;
|
||||||
@zindexTooltip: 1030;
|
@zindex-dropdown: 1000;
|
||||||
@zindexFixedNavbar: 1030;
|
@zindex-popover: 1010;
|
||||||
@zindexModalBackdrop: 1040;
|
@zindex-tooltip: 1030;
|
||||||
@zindexModal: 1050;
|
@zindex-navbar-fixed: 1030;
|
||||||
|
@zindex-modal-background: 1040;
|
||||||
|
@zindex-modal: 1050;
|
||||||
|
|
||||||
|
// Media queries breakpoints
|
||||||
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
// Extra small screen / phone
|
||||||
|
@screen-xs: 480px;
|
||||||
|
@screen-phone: @screen-xs;
|
||||||
|
|
||||||
|
// Small screen / tablet
|
||||||
|
@screen-sm: 768px;
|
||||||
|
@screen-tablet: @screen-sm;
|
||||||
|
|
||||||
|
// Medium screen / desktop
|
||||||
|
@screen-md: 992px;
|
||||||
|
@screen-desktop: @screen-md;
|
||||||
|
|
||||||
|
// Large screen / wide desktop
|
||||||
|
@screen-lg: 1600px;
|
||||||
|
@screen-lg-desktop: @screen-lg;
|
||||||
|
|
||||||
|
// So media queries don't overlap when required, provide a maximum
|
||||||
|
@screen-xs-max: (@screen-sm - 1);
|
||||||
|
@screen-sm-max: (@screen-md - 1);
|
||||||
|
@screen-md-max: (@screen-lg - 1);
|
||||||
|
|
||||||
|
|
||||||
// Sprite icons path
|
// Grid system
|
||||||
// -------------------------
|
// --------------------------------------------------
|
||||||
@iconSpritePath: "../img/glyphicons-halflings.png";
|
|
||||||
@iconWhiteSpritePath: "../img/glyphicons-halflings-white.png";
|
|
||||||
|
|
||||||
|
// Number of columns in the grid system
|
||||||
// Input placeholder text color
|
@grid-columns: 12;
|
||||||
// -------------------------
|
// Padding, to be divided by two and applied to the left and right of all columns
|
||||||
@placeholderText: @grayLight;
|
@grid-gutter-width: 30px;
|
||||||
|
// Point at which the navbar stops collapsing
|
||||||
|
@grid-float-breakpoint: @screen-desktop;
|
||||||
// Hr border color
|
|
||||||
// -------------------------
|
|
||||||
@hrBorder: @grayLighter;
|
|
||||||
|
|
||||||
|
|
||||||
// Horizontal forms & lists
|
|
||||||
// -------------------------
|
|
||||||
@horizontalComponentOffset: 180px;
|
|
||||||
|
|
||||||
|
|
||||||
// Wells
|
|
||||||
// -------------------------
|
|
||||||
@wellBackground: #f5f5f5;
|
|
||||||
|
|
||||||
|
|
||||||
// Navbar
|
// Navbar
|
||||||
// -------------------------
|
// -------------------------
|
||||||
@navbarCollapseWidth: 979px;
|
|
||||||
@navbarCollapseDesktopWidth: @navbarCollapseWidth + 1;
|
|
||||||
|
|
||||||
@navbarHeight: 40px;
|
|
||||||
@navbarBackgroundHighlight: #ffffff;
|
|
||||||
@navbarBackground: darken(@navbarBackgroundHighlight, 5%);
|
|
||||||
@navbarBorder: darken(@navbarBackground, 12%);
|
|
||||||
|
|
||||||
@navbarText: #777;
|
// Basics of a navbar
|
||||||
@navbarLinkColor: #777;
|
@navbar-height: 50px;
|
||||||
@navbarLinkColorHover: @grayDark;
|
@navbar-margin-bottom: @line-height-computed;
|
||||||
@navbarLinkColorActive: @gray;
|
@navbar-default-color: #777;
|
||||||
@navbarLinkBackgroundHover: transparent;
|
@navbar-default-bg: #f8f8f8;
|
||||||
@navbarLinkBackgroundActive: darken(@navbarBackground, 5%);
|
@navbar-default-border: darken(@navbar-default-bg, 6.5%);
|
||||||
|
@navbar-border-radius: @border-radius-base;
|
||||||
|
@navbar-padding-horizontal: floor(@grid-gutter-width / 2);
|
||||||
|
@navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2);
|
||||||
|
|
||||||
|
// Navbar links
|
||||||
|
@navbar-default-link-color: #777;
|
||||||
|
@navbar-default-link-hover-color: #333;
|
||||||
|
@navbar-default-link-hover-bg: transparent;
|
||||||
|
@navbar-default-link-active-color: #555;
|
||||||
|
@navbar-default-link-active-bg: darken(@navbar-default-bg, 6.5%);
|
||||||
|
@navbar-default-link-disabled-color: #ccc;
|
||||||
|
@navbar-default-link-disabled-bg: transparent;
|
||||||
|
|
||||||
|
// Navbar brand label
|
||||||
|
@navbar-default-brand-color: @navbar-default-link-color;
|
||||||
|
@navbar-default-brand-hover-color: darken(@navbar-default-link-color, 10%);
|
||||||
|
@navbar-default-brand-hover-bg: transparent;
|
||||||
|
|
||||||
|
// Navbar toggle
|
||||||
|
@navbar-default-toggle-hover-bg: #ddd;
|
||||||
|
@navbar-default-toggle-icon-bar-bg: #ccc;
|
||||||
|
@navbar-default-toggle-border-color: #ddd;
|
||||||
|
|
||||||
@navbarBrandColor: @navbarLinkColor;
|
|
||||||
|
|
||||||
// Inverted navbar
|
// Inverted navbar
|
||||||
@navbarInverseBackground: #111111;
|
//
|
||||||
@navbarInverseBackgroundHighlight: #222222;
|
// Reset inverted navbar basics
|
||||||
@navbarInverseBorder: #252525;
|
@navbar-inverse-color: @gray-light;
|
||||||
|
@navbar-inverse-bg: #222;
|
||||||
|
@navbar-inverse-border: darken(@navbar-inverse-bg, 10%);
|
||||||
|
|
||||||
@navbarInverseText: @grayLight;
|
// Inverted navbar links
|
||||||
@navbarInverseLinkColor: @grayLight;
|
@navbar-inverse-link-color: @gray-light;
|
||||||
@navbarInverseLinkColorHover: @white;
|
@navbar-inverse-link-hover-color: #fff;
|
||||||
@navbarInverseLinkColorActive: @navbarInverseLinkColorHover;
|
@navbar-inverse-link-hover-bg: transparent;
|
||||||
@navbarInverseLinkBackgroundHover: transparent;
|
@navbar-inverse-link-active-color: @navbar-inverse-link-hover-color;
|
||||||
@navbarInverseLinkBackgroundActive: @navbarInverseBackground;
|
@navbar-inverse-link-active-bg: darken(@navbar-inverse-bg, 10%);
|
||||||
|
@navbar-inverse-link-disabled-color: #444;
|
||||||
|
@navbar-inverse-link-disabled-bg: transparent;
|
||||||
|
|
||||||
@navbarInverseSearchBackground: lighten(@navbarInverseBackground, 25%);
|
// Inverted navbar brand label
|
||||||
@navbarInverseSearchBackgroundFocus: @white;
|
@navbar-inverse-brand-color: @navbar-inverse-link-color;
|
||||||
@navbarInverseSearchBorder: @navbarInverseBackground;
|
@navbar-inverse-brand-hover-color: #fff;
|
||||||
@navbarInverseSearchPlaceholderColor: #ccc;
|
@navbar-inverse-brand-hover-bg: transparent;
|
||||||
|
|
||||||
@navbarInverseBrandColor: @navbarInverseLinkColor;
|
// Inverted navbar search
|
||||||
|
// Normal navbar needs no special styles or vars
|
||||||
|
@navbar-inverse-search-bg: lighten(@navbar-inverse-bg, 25%);
|
||||||
|
@navbar-inverse-search-bg-focus: #fff;
|
||||||
|
@navbar-inverse-search-border: @navbar-inverse-bg;
|
||||||
|
@navbar-inverse-search-placeholder-color: #ccc;
|
||||||
|
|
||||||
|
// Inverted navbar toggle
|
||||||
|
@navbar-inverse-toggle-hover-bg: #333;
|
||||||
|
@navbar-inverse-toggle-icon-bar-bg: #fff;
|
||||||
|
@navbar-inverse-toggle-border-color: #333;
|
||||||
|
|
||||||
|
|
||||||
|
// Navs
|
||||||
|
// -------------------------
|
||||||
|
|
||||||
|
@nav-link-padding: 10px 15px;
|
||||||
|
@nav-link-hover-bg: @gray-lighter;
|
||||||
|
|
||||||
|
@nav-disabled-link-color: @gray-light;
|
||||||
|
@nav-disabled-link-hover-color: @gray-light;
|
||||||
|
|
||||||
|
@nav-open-link-hover-color: #fff;
|
||||||
|
@nav-open-caret-border-color: #fff;
|
||||||
|
|
||||||
|
// Tabs
|
||||||
|
@nav-tabs-border-color: #ddd;
|
||||||
|
|
||||||
|
@nav-tabs-link-hover-border-color: @gray-lighter;
|
||||||
|
|
||||||
|
@nav-tabs-active-link-hover-bg: @body-bg;
|
||||||
|
@nav-tabs-active-link-hover-color: @gray;
|
||||||
|
@nav-tabs-active-link-hover-border-color: #ddd;
|
||||||
|
|
||||||
|
@nav-tabs-justified-link-border-color: #ddd;
|
||||||
|
@nav-tabs-justified-active-link-border-color: @body-bg;
|
||||||
|
|
||||||
|
// Pills
|
||||||
|
@nav-pills-active-link-hover-bg: @component-active-bg;
|
||||||
|
@nav-pills-active-link-hover-color: #fff;
|
||||||
|
|
||||||
|
|
||||||
// Pagination
|
// Pagination
|
||||||
// -------------------------
|
// -------------------------
|
||||||
@paginationBackground: #fff;
|
|
||||||
@paginationBorder: #ddd;
|
@pagination-bg: #fff;
|
||||||
@paginationActiveBackground: #f5f5f5;
|
@pagination-border: #ddd;
|
||||||
|
|
||||||
|
@pagination-hover-bg: @gray-lighter;
|
||||||
|
|
||||||
|
@pagination-active-bg: @brand-primary;
|
||||||
|
@pagination-active-color: #fff;
|
||||||
|
|
||||||
|
@pagination-disabled-color: @gray-light;
|
||||||
|
|
||||||
|
|
||||||
// Hero unit
|
// Pager
|
||||||
// -------------------------
|
// -------------------------
|
||||||
@heroUnitBackground: @grayLighter;
|
|
||||||
@heroUnitHeadingColor: inherit;
|
@pager-border-radius: 15px;
|
||||||
@heroUnitLeadColor: inherit;
|
@pager-disabled-color: @gray-light;
|
||||||
|
|
||||||
|
|
||||||
|
// Jumbotron
|
||||||
|
// -------------------------
|
||||||
|
|
||||||
|
@jumbotron-padding: 30px;
|
||||||
|
@jumbotron-color: inherit;
|
||||||
|
@jumbotron-bg: @gray-lighter;
|
||||||
|
|
||||||
|
@jumbotron-heading-color: inherit;
|
||||||
|
|
||||||
|
|
||||||
// Form states and alerts
|
// Form states and alerts
|
||||||
// -------------------------
|
// -------------------------
|
||||||
@warningText: #c09853;
|
|
||||||
@warningBackground: #fcf8e3;
|
|
||||||
@warningBorder: darken(spin(@warningBackground, -10), 3%);
|
|
||||||
|
|
||||||
@errorText: #b94a48;
|
@state-warning-text: #c09853;
|
||||||
@errorBackground: #f2dede;
|
@state-warning-bg: #fcf8e3;
|
||||||
@errorBorder: darken(spin(@errorBackground, -10), 3%);
|
@state-warning-border: darken(spin(@state-warning-bg, -10), 3%);
|
||||||
|
|
||||||
@successText: #468847;
|
@state-danger-text: #b94a48;
|
||||||
@successBackground: #dff0d8;
|
@state-danger-bg: #f2dede;
|
||||||
@successBorder: darken(spin(@successBackground, -10), 5%);
|
@state-danger-border: darken(spin(@state-danger-bg, -10), 3%);
|
||||||
|
|
||||||
@infoText: #3a87ad;
|
@state-success-text: #468847;
|
||||||
@infoBackground: #d9edf7;
|
@state-success-bg: #dff0d8;
|
||||||
@infoBorder: darken(spin(@infoBackground, -10), 7%);
|
@state-success-border: darken(spin(@state-success-bg, -10), 5%);
|
||||||
|
|
||||||
|
@state-info-text: #3a87ad;
|
||||||
|
@state-info-bg: #d9edf7;
|
||||||
|
@state-info-border: darken(spin(@state-info-bg, -10), 7%);
|
||||||
|
|
||||||
|
|
||||||
// Tooltips and popovers
|
// Tooltips
|
||||||
// -------------------------
|
// -------------------------
|
||||||
@tooltipColor: #fff;
|
@tooltip-max-width: 200px;
|
||||||
@tooltipBackground: #000;
|
@tooltip-color: #fff;
|
||||||
@tooltipArrowWidth: 5px;
|
@tooltip-bg: #000;
|
||||||
@tooltipArrowColor: @tooltipBackground;
|
|
||||||
|
|
||||||
@popoverBackground: #fff;
|
@tooltip-arrow-width: 5px;
|
||||||
@popoverArrowWidth: 10px;
|
@tooltip-arrow-color: @tooltip-bg;
|
||||||
@popoverArrowColor: #fff;
|
|
||||||
@popoverTitleBackground: darken(@popoverBackground, 3%);
|
|
||||||
|
|
||||||
// Special enhancement for popovers
|
|
||||||
@popoverArrowOuterWidth: @popoverArrowWidth + 1;
|
|
||||||
@popoverArrowOuterColor: rgba(0,0,0,.25);
|
|
||||||
|
|
||||||
|
|
||||||
|
// Popovers
|
||||||
|
// -------------------------
|
||||||
|
@popover-bg: #fff;
|
||||||
|
@popover-max-width: 276px;
|
||||||
|
@popover-border-color: rgba(0,0,0,.2);
|
||||||
|
@popover-fallback-border-color: #ccc;
|
||||||
|
|
||||||
// GRID
|
@popover-title-bg: darken(@popover-bg, 3%);
|
||||||
|
|
||||||
|
@popover-arrow-width: 10px;
|
||||||
|
@popover-arrow-color: #fff;
|
||||||
|
|
||||||
|
@popover-arrow-outer-width: (@popover-arrow-width + 1);
|
||||||
|
@popover-arrow-outer-color: rgba(0,0,0,.25);
|
||||||
|
@popover-arrow-outer-fallback-color: #999;
|
||||||
|
|
||||||
|
|
||||||
|
// Labels
|
||||||
|
// -------------------------
|
||||||
|
|
||||||
|
@label-default-bg: @gray-light;
|
||||||
|
@label-primary-bg: @brand-primary;
|
||||||
|
@label-success-bg: @brand-success;
|
||||||
|
@label-info-bg: @brand-info;
|
||||||
|
@label-warning-bg: @brand-warning;
|
||||||
|
@label-danger-bg: @brand-danger;
|
||||||
|
|
||||||
|
@label-color: #fff;
|
||||||
|
@label-link-hover-color: #fff;
|
||||||
|
|
||||||
|
|
||||||
|
// Modals
|
||||||
|
// -------------------------
|
||||||
|
@modal-inner-padding: 20px;
|
||||||
|
|
||||||
|
@modal-title-padding: 15px;
|
||||||
|
@modal-title-line-height: @line-height-base;
|
||||||
|
|
||||||
|
@modal-content-bg: #fff;
|
||||||
|
@modal-content-border-color: rgba(0,0,0,.2);
|
||||||
|
@modal-content-fallback-border-color: #999;
|
||||||
|
|
||||||
|
@modal-backdrop-bg: #000;
|
||||||
|
@modal-header-border-color: #e5e5e5;
|
||||||
|
@modal-footer-border-color: @modal-header-border-color;
|
||||||
|
|
||||||
|
|
||||||
|
// Alerts
|
||||||
|
// -------------------------
|
||||||
|
@alert-padding: 15px;
|
||||||
|
@alert-border-radius: @border-radius-base;
|
||||||
|
@alert-link-font-weight: bold;
|
||||||
|
|
||||||
|
@alert-success-bg: @state-success-bg;
|
||||||
|
@alert-success-text: @state-success-text;
|
||||||
|
@alert-success-border: @state-success-border;
|
||||||
|
|
||||||
|
@alert-info-bg: @state-info-bg;
|
||||||
|
@alert-info-text: @state-info-text;
|
||||||
|
@alert-info-border: @state-info-border;
|
||||||
|
|
||||||
|
@alert-warning-bg: @state-warning-bg;
|
||||||
|
@alert-warning-text: @state-warning-text;
|
||||||
|
@alert-warning-border: @state-warning-border;
|
||||||
|
|
||||||
|
@alert-danger-bg: @state-danger-bg;
|
||||||
|
@alert-danger-text: @state-danger-text;
|
||||||
|
@alert-danger-border: @state-danger-border;
|
||||||
|
|
||||||
|
|
||||||
|
// Progress bars
|
||||||
|
// -------------------------
|
||||||
|
@progress-bg: #f5f5f5;
|
||||||
|
@progress-bar-color: #fff;
|
||||||
|
|
||||||
|
@progress-bar-bg: @brand-primary;
|
||||||
|
@progress-bar-success-bg: @brand-success;
|
||||||
|
@progress-bar-warning-bg: @brand-warning;
|
||||||
|
@progress-bar-danger-bg: @brand-danger;
|
||||||
|
@progress-bar-info-bg: @brand-info;
|
||||||
|
|
||||||
|
|
||||||
|
// List group
|
||||||
|
// -------------------------
|
||||||
|
@list-group-bg: #fff;
|
||||||
|
@list-group-border: #ddd;
|
||||||
|
@list-group-border-radius: @border-radius-base;
|
||||||
|
|
||||||
|
@list-group-hover-bg: #f5f5f5;
|
||||||
|
@list-group-active-color: #fff;
|
||||||
|
@list-group-active-bg: @component-active-bg;
|
||||||
|
@list-group-active-border: @list-group-active-bg;
|
||||||
|
|
||||||
|
@list-group-link-color: #555;
|
||||||
|
@list-group-link-heading-color: #333;
|
||||||
|
|
||||||
|
|
||||||
|
// Panels
|
||||||
|
// -------------------------
|
||||||
|
@panel-bg: #fff;
|
||||||
|
@panel-inner-border: #ddd;
|
||||||
|
@panel-border-radius: @border-radius-base;
|
||||||
|
@panel-footer-bg: #f5f5f5;
|
||||||
|
|
||||||
|
@panel-default-text: @gray-dark;
|
||||||
|
@panel-default-border: #ddd;
|
||||||
|
@panel-default-heading-bg: #f5f5f5;
|
||||||
|
|
||||||
|
@panel-primary-text: #fff;
|
||||||
|
@panel-primary-border: @brand-primary;
|
||||||
|
@panel-primary-heading-bg: @brand-primary;
|
||||||
|
|
||||||
|
@panel-success-text: @state-success-text;
|
||||||
|
@panel-success-border: @state-success-border;
|
||||||
|
@panel-success-heading-bg: @state-success-bg;
|
||||||
|
|
||||||
|
@panel-warning-text: @state-warning-text;
|
||||||
|
@panel-warning-border: @state-warning-border;
|
||||||
|
@panel-warning-heading-bg: @state-warning-bg;
|
||||||
|
|
||||||
|
@panel-danger-text: @state-danger-text;
|
||||||
|
@panel-danger-border: @state-danger-border;
|
||||||
|
@panel-danger-heading-bg: @state-danger-bg;
|
||||||
|
|
||||||
|
@panel-info-text: @state-info-text;
|
||||||
|
@panel-info-border: @state-info-border;
|
||||||
|
@panel-info-heading-bg: @state-info-bg;
|
||||||
|
|
||||||
|
|
||||||
|
// Thumbnails
|
||||||
|
// -------------------------
|
||||||
|
@thumbnail-padding: 4px;
|
||||||
|
@thumbnail-bg: @body-bg;
|
||||||
|
@thumbnail-border: #ddd;
|
||||||
|
@thumbnail-border-radius: @border-radius-base;
|
||||||
|
|
||||||
|
@thumbnail-caption-color: @text-color;
|
||||||
|
@thumbnail-caption-padding: 9px;
|
||||||
|
|
||||||
|
|
||||||
|
// Wells
|
||||||
|
// -------------------------
|
||||||
|
@well-bg: #f5f5f5;
|
||||||
|
|
||||||
|
|
||||||
|
// Badges
|
||||||
|
// -------------------------
|
||||||
|
@badge-color: #fff;
|
||||||
|
@badge-link-hover-color: #fff;
|
||||||
|
@badge-bg: @gray-light;
|
||||||
|
|
||||||
|
@badge-active-color: @link-color;
|
||||||
|
@badge-active-bg: #fff;
|
||||||
|
|
||||||
|
@badge-font-weight: bold;
|
||||||
|
@badge-line-height: 1;
|
||||||
|
@badge-border-radius: 10px;
|
||||||
|
|
||||||
|
|
||||||
|
// Breadcrumbs
|
||||||
|
// -------------------------
|
||||||
|
@breadcrumb-bg: #f5f5f5;
|
||||||
|
@breadcrumb-color: #ccc;
|
||||||
|
@breadcrumb-active-color: @gray-light;
|
||||||
|
|
||||||
|
|
||||||
|
// Carousel
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
@carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6);
|
||||||
|
|
||||||
|
@carousel-control-color: #fff;
|
||||||
|
@carousel-control-width: 15%;
|
||||||
|
@carousel-control-opacity: .5;
|
||||||
|
@carousel-control-font-size: 20px;
|
||||||
|
|
||||||
|
@carousel-indicator-active-bg: #fff;
|
||||||
|
@carousel-indicator-border-color: #fff;
|
||||||
|
|
||||||
|
@carousel-caption-color: #fff;
|
||||||
|
|
||||||
|
|
||||||
|
// Close
|
||||||
|
// ------------------------
|
||||||
|
@close-color: #000;
|
||||||
|
@close-font-weight: bold;
|
||||||
|
@close-text-shadow: 0 1px 0 #fff;
|
||||||
|
|
||||||
|
|
||||||
|
// Code
|
||||||
|
// ------------------------
|
||||||
|
@code-color: #c7254e;
|
||||||
|
@code-bg: #f9f2f4;
|
||||||
|
|
||||||
|
@pre-bg: #f5f5f5;
|
||||||
|
@pre-color: @gray-dark;
|
||||||
|
@pre-border-color: #ccc;
|
||||||
|
@pre-scrollable-max-height: 340px;
|
||||||
|
|
||||||
|
// Type
|
||||||
|
// ------------------------
|
||||||
|
@text-muted: @gray-light;
|
||||||
|
@abbr-border-color: @gray-light;
|
||||||
|
@headings-small-color: @gray-light;
|
||||||
|
@blockquote-small-color: @gray-light;
|
||||||
|
@blockquote-border-color: @gray-lighter;
|
||||||
|
@page-header-border-color: @gray-lighter;
|
||||||
|
|
||||||
|
// Miscellaneous
|
||||||
|
// -------------------------
|
||||||
|
|
||||||
|
// Hr border color
|
||||||
|
@hr-border: @gray-lighter;
|
||||||
|
|
||||||
|
// Horizontal forms & lists
|
||||||
|
@component-offset-horizontal: 180px;
|
||||||
|
|
||||||
|
|
||||||
|
// Container sizes
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
// Small screen / tablet
|
||||||
|
@container-tablet: ((720px + @grid-gutter-width));
|
||||||
|
|
||||||
// Default 940px grid
|
// Medium screen / desktop
|
||||||
// -------------------------
|
@container-desktop: ((940px + @grid-gutter-width));
|
||||||
@gridColumns: 12;
|
|
||||||
@gridColumnWidth: 60px;
|
|
||||||
@gridGutterWidth: 20px;
|
|
||||||
@gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
|
|
||||||
|
|
||||||
// 1200px min
|
// Large screen / wide desktop
|
||||||
@gridColumnWidth1200: 70px;
|
@container-lg-desktop: ((1140px + @grid-gutter-width));
|
||||||
@gridGutterWidth1200: 30px;
|
|
||||||
@gridRowWidth1200: (@gridColumns * @gridColumnWidth1200) + (@gridGutterWidth1200 * (@gridColumns - 1));
|
|
||||||
|
|
||||||
// 768px-979px
|
|
||||||
@gridColumnWidth768: 42px;
|
|
||||||
@gridGutterWidth768: 20px;
|
|
||||||
@gridRowWidth768: (@gridColumns * @gridColumnWidth768) + (@gridGutterWidth768 * (@gridColumns - 1));
|
|
||||||
|
|
||||||
|
|
||||||
// Fluid grid
|
|
||||||
// -------------------------
|
|
||||||
@fluidGridColumnWidth: percentage(@gridColumnWidth/@gridRowWidth);
|
|
||||||
@fluidGridGutterWidth: percentage(@gridGutterWidth/@gridRowWidth);
|
|
||||||
|
|
||||||
// 1200px min
|
|
||||||
@fluidGridColumnWidth1200: percentage(@gridColumnWidth1200/@gridRowWidth1200);
|
|
||||||
@fluidGridGutterWidth1200: percentage(@gridGutterWidth1200/@gridRowWidth1200);
|
|
||||||
|
|
||||||
// 768px-979px
|
|
||||||
@fluidGridColumnWidth768: percentage(@gridColumnWidth768/@gridRowWidth768);
|
|
||||||
@fluidGridGutterWidth768: percentage(@gridGutterWidth768/@gridRowWidth768);
|
|
||||||
|
|
BIN
docs/theme/docker/static/img/container3.png
vendored
Normal file
After Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
BIN
docs/theme/docker/static/img/menu_arrow_down.gif
vendored
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
docs/theme/docker/static/img/menu_arrow_right.gif
vendored
Normal file
After Width: | Height: | Size: 2.1 KiB |
105
docs/theme/docker/static/js/docs.js
vendored
|
@ -1,32 +1,90 @@
|
||||||
|
|
||||||
|
// This script should be included at the END of the document.
|
||||||
|
// For the fastest loading it does not inlude $(document).ready()
|
||||||
|
|
||||||
|
// This Document contains a few helper functions for the documentation to display the current version,
|
||||||
|
// collapse and expand the menu etc.
|
||||||
|
|
||||||
|
|
||||||
|
// Function to make the sticky header possible
|
||||||
|
function shiftWindow() {
|
||||||
|
scrollBy(0, -70);
|
||||||
|
console.log("window shifted")
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener("hashchange", shiftWindow);
|
||||||
|
|
||||||
|
function loadShift() {
|
||||||
|
if (window.location.hash) {
|
||||||
|
console.log("window has hash");
|
||||||
|
shiftWindow();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(window).load(function() {
|
||||||
|
loadShift();
|
||||||
|
});
|
||||||
|
|
||||||
$(function(){
|
$(function(){
|
||||||
|
|
||||||
// init multi-vers stuff
|
// sidebar accordian-ing
|
||||||
$('.tabswitcher').each(function(i, multi_vers){
|
// don't apply on last object (it should be the FAQ) or the first (it should be introduction)
|
||||||
var tabs = $('<ul></ul>');
|
|
||||||
$(multi_vers).prepend(tabs);
|
|
||||||
$(multi_vers).children('.tab').each(function(j, vers_content){
|
|
||||||
vers = $(vers_content).children(':first').text();
|
|
||||||
var id = 'multi_vers_' + '_' + i + '_' + j;
|
|
||||||
$(vers_content).attr('id', id);
|
|
||||||
$(tabs).append('<li><a href="#' + id + '">' + vers + '</a></li>');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$( ".tabswitcher" ).tabs();
|
|
||||||
|
|
||||||
// sidebar acordian-ing
|
// define an array to which all opened items should be added
|
||||||
// don't apply on last object (it should be the FAQ)
|
var openmenus = [];
|
||||||
$('nav > ul > li > a').not(':last').click(function(){
|
|
||||||
if ($(this).parent().hasClass('current')) {
|
var elements = $('.toctree-l2');
|
||||||
$(this).parent().children('ul').slideUp(200, function() {
|
// for (var i = 0; i < elements.length; i += 1) { var current = $(elements[i]); current.children('ul').hide();}
|
||||||
$(this).parent().removeClass('current'); // toggle after effect
|
|
||||||
});
|
|
||||||
|
// set initial collapsed state
|
||||||
|
var elements = $('.toctree-l1');
|
||||||
|
for (var i = 0; i < elements.length; i += 1) {
|
||||||
|
var current = $(elements[i]);
|
||||||
|
if (current.hasClass('current')) {
|
||||||
|
current.addClass('open');
|
||||||
|
currentlink = current.children('a')[0].href;
|
||||||
|
openmenus.push(currentlink);
|
||||||
|
|
||||||
|
// do nothing
|
||||||
} else {
|
} else {
|
||||||
$('nav > ul > li > ul').slideUp(100);
|
// collapse children
|
||||||
|
current.children('ul').hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (doc_version == "") {
|
||||||
|
$('.version-flyer ul').html('<li class="alternative active-slug"><a href="" title="Switch to local">Local</a></li>');
|
||||||
|
}
|
||||||
|
|
||||||
|
// mark the active documentation in the version widget
|
||||||
|
$(".version-flyer a:contains('" + doc_version + "')").parent().addClass('active-slug');
|
||||||
|
|
||||||
|
|
||||||
|
// attached handler on click
|
||||||
|
// Do not attach to first element or last (intro, faq) so that
|
||||||
|
// first and last link directly instead of accordian
|
||||||
|
$('.sidebar > ul > li > a').not(':last').not(':first').click(function(){
|
||||||
|
|
||||||
|
var index = $.inArray(this.href, openmenus)
|
||||||
|
|
||||||
|
if (index > -1) {
|
||||||
|
console.log(index);
|
||||||
|
openmenus.splice(index, 1);
|
||||||
|
|
||||||
|
|
||||||
|
$(this).parent().children('ul').slideUp(200, function() {
|
||||||
|
$(this).parent().removeClass('open'); // toggle after effect
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
openmenus.push(this.href);
|
||||||
|
|
||||||
var current = $(this);
|
var current = $(this);
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$('nav > ul > li').removeClass('current');
|
// $('.sidebar > ul > li').removeClass('current');
|
||||||
current.parent().addClass('current'); // toggle before effect
|
current.parent().addClass('current').addClass('open'); // toggle before effect
|
||||||
current.parent().children('ul').hide();
|
current.parent().children('ul').hide();
|
||||||
current.parent().children('ul').slideDown(200);
|
current.parent().children('ul').slideDown(200);
|
||||||
}, 100);
|
}, 100);
|
||||||
|
@ -34,4 +92,7 @@ $(function(){
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// add class to all those which have children
|
||||||
|
$('.sidebar > ul > li').not(':last').not(':first').addClass('has-children');
|
||||||
|
|
||||||
});
|
});
|
18
docs/theme/docker/static/js/jquery.ba-bbq.min.js
vendored
|
@ -1,18 +0,0 @@
|
||||||
/*
|
|
||||||
* jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010
|
|
||||||
* http://benalman.com/projects/jquery-bbq-plugin/
|
|
||||||
*
|
|
||||||
* Copyright (c) 2010 "Cowboy" Ben Alman
|
|
||||||
* Dual licensed under the MIT and GPL licenses.
|
|
||||||
* http://benalman.com/about/license/
|
|
||||||
*/
|
|
||||||
(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this);
|
|
||||||
/*
|
|
||||||
* jQuery hashchange event - v1.2 - 2/11/2010
|
|
||||||
* http://benalman.com/projects/jquery-hashchange-plugin/
|
|
||||||
*
|
|
||||||
* Copyright (c) 2010 "Cowboy" Ben Alman
|
|
||||||
* Dual licensed under the MIT and GPL licenses.
|
|
||||||
* http://benalman.com/about/license/
|
|
||||||
*/
|
|
||||||
(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this);
|
|
|
@ -1,9 +0,0 @@
|
||||||
/*
|
|
||||||
* urlInternal - v1.0 - 10/7/2009
|
|
||||||
* http://benalman.com/projects/jquery-urlinternal-plugin/
|
|
||||||
*
|
|
||||||
* Copyright (c) 2009 "Cowboy" Ben Alman
|
|
||||||
* Dual licensed under the MIT and GPL licenses.
|
|
||||||
* http://benalman.com/about/license/
|
|
||||||
*/
|
|
||||||
(function($){var g,i=!0,r=!1,m=window.location,h=Array.prototype.slice,b=m.href.match(/^((https?:\/\/.*?\/)?[^#]*)#?.*$/),u=b[1]+"#",t=b[2],e,l,f,q,c,j,x="elemUrlAttr",k="href",y="src",p="urlInternal",d="urlExternal",n="urlFragment",a,s={};function w(A){var z=h.call(arguments,1);return function(){return A.apply(this,z.concat(h.call(arguments)))}}$.isUrlInternal=q=function(z){if(!z||j(z)){return g}if(a.test(z)){return i}if(/^(?:https?:)?\/\//i.test(z)){return r}if(/^[a-z\d.-]+:/i.test(z)){return g}return i};$.isUrlExternal=c=function(z){var A=q(z);return typeof A==="boolean"?!A:A};$.isUrlFragment=j=function(z){var A=(z||"").match(/^([^#]?)([^#]*#).*$/);return !!A&&(A[2]==="#"||z.indexOf(u)===0||(A[1]==="/"?t+A[2]===u:!/^https?:\/\//i.test(z)&&$('<a href="'+z+'"/>')[0].href.indexOf(u)===0))};function v(A,z){return this.filter(":"+A+(z?"("+z+")":""))}$.fn[p]=w(v,p);$.fn[d]=w(v,d);$.fn[n]=w(v,n);function o(D,C,B,A){var z=A[3]||e()[(C.nodeName||"").toLowerCase()]||"";return z?!!D(C.getAttribute(z)):r}$.expr[":"][p]=w(o,q);$.expr[":"][d]=w(o,c);$.expr[":"][n]=w(o,j);$[x]||($[x]=function(z){return $.extend(s,z)})({a:k,base:k,iframe:y,img:y,input:y,form:"action",link:k,script:y});e=$[x];$.urlInternalHost=l=function(B){B=B?"(?:(?:"+Array.prototype.join.call(arguments,"|")+")\\.)?":"";var A=new RegExp("^"+B+"(.*)","i"),z="^(?:"+m.protocol+")?//"+m.hostname.replace(A,B+"$1").replace(/\\?\./g,"\\.")+(m.port?":"+m.port:"")+"/";return f(z)};$.urlInternalRegExp=f=function(z){if(z){a=typeof z==="string"?new RegExp(z,"i"):z}return a};l("www")})(jQuery);
|
|
1
docs/theme/docker/static/js/main.js
vendored
|
@ -1 +0,0 @@
|
||||||
|
|
2268
docs/theme/docker/static/js/vendor/bootstrap.js
vendored
|
@ -25,9 +25,9 @@ set -e
|
||||||
# but really, they shouldn't. We want to be in a container!
|
# but really, they shouldn't. We want to be in a container!
|
||||||
RESOLVCONF=$(readlink --canonicalize /etc/resolv.conf)
|
RESOLVCONF=$(readlink --canonicalize /etc/resolv.conf)
|
||||||
grep -q "$RESOLVCONF" /proc/mounts || {
|
grep -q "$RESOLVCONF" /proc/mounts || {
|
||||||
echo "# WARNING! I don't seem to be running in a docker container."
|
echo >&2 "# WARNING! I don't seem to be running in a docker container."
|
||||||
echo "# The result of this command might be an incorrect build, and will not be officially supported."
|
echo >&2 "# The result of this command might be an incorrect build, and will not be officially supported."
|
||||||
echo "# Try this: 'docker build -t docker . && docker run docker ./hack/make.sh'"
|
echo >&2 "# Try this: 'docker build -t docker . && docker run docker ./hack/make.sh'"
|
||||||
}
|
}
|
||||||
|
|
||||||
# List of bundles to create when no argument is passed
|
# List of bundles to create when no argument is passed
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
DEST=$1
|
DEST=$1
|
||||||
|
|
||||||
go build -o $DEST/docker-$VERSION -ldflags "$LDFLAGS" ./docker
|
if go build -o $DEST/docker-$VERSION -ldflags "$LDFLAGS" ./docker; then
|
||||||
|
echo "Created binary: $DEST/docker-$VERSION"
|
||||||
echo "Created binary: $DEST/docker-$VERSION"
|
fi
|
||||||
|
|
|
@ -217,7 +217,8 @@ func (runtime *Runtime) Register(container *Container) error {
|
||||||
close(container.waitLock)
|
close(container.waitLock)
|
||||||
} else if !nomonitor {
|
} else if !nomonitor {
|
||||||
container.allocateNetwork()
|
container.allocateNetwork()
|
||||||
go container.monitor()
|
// hostConfig isn't needed here and can be nil
|
||||||
|
go container.monitor(nil)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
27
server.go
|
@ -1177,11 +1177,12 @@ func (srv *Server) ContainerResize(name string, h, w int) error {
|
||||||
return fmt.Errorf("No such container: %s", name)
|
return fmt.Errorf("No such container: %s", name)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (srv *Server) ContainerAttach(name string, logs, stream, stdin, stdout, stderr bool, in io.ReadCloser, out io.Writer) error {
|
func (srv *Server) ContainerAttach(name string, logs, stream, stdin, stdout, stderr bool, inStream io.ReadCloser, outStream, errStream io.Writer) error {
|
||||||
container := srv.runtime.Get(name)
|
container := srv.runtime.Get(name)
|
||||||
if container == nil {
|
if container == nil {
|
||||||
return fmt.Errorf("No such container: %s", name)
|
return fmt.Errorf("No such container: %s", name)
|
||||||
}
|
}
|
||||||
|
|
||||||
//logs
|
//logs
|
||||||
if logs {
|
if logs {
|
||||||
cLog, err := container.ReadLog("json")
|
cLog, err := container.ReadLog("json")
|
||||||
|
@ -1192,7 +1193,7 @@ func (srv *Server) ContainerAttach(name string, logs, stream, stdin, stdout, std
|
||||||
cLog, err := container.ReadLog("stdout")
|
cLog, err := container.ReadLog("stdout")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Debugf("Error reading logs (stdout): %s", err)
|
utils.Debugf("Error reading logs (stdout): %s", err)
|
||||||
} else if _, err := io.Copy(out, cLog); err != nil {
|
} else if _, err := io.Copy(outStream, cLog); err != nil {
|
||||||
utils.Debugf("Error streaming logs (stdout): %s", err)
|
utils.Debugf("Error streaming logs (stdout): %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1200,7 +1201,7 @@ func (srv *Server) ContainerAttach(name string, logs, stream, stdin, stdout, std
|
||||||
cLog, err := container.ReadLog("stderr")
|
cLog, err := container.ReadLog("stderr")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Debugf("Error reading logs (stderr): %s", err)
|
utils.Debugf("Error reading logs (stderr): %s", err)
|
||||||
} else if _, err := io.Copy(out, cLog); err != nil {
|
} else if _, err := io.Copy(errStream, cLog); err != nil {
|
||||||
utils.Debugf("Error streaming logs (stderr): %s", err)
|
utils.Debugf("Error streaming logs (stderr): %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1209,15 +1210,19 @@ func (srv *Server) ContainerAttach(name string, logs, stream, stdin, stdout, std
|
||||||
} else {
|
} else {
|
||||||
dec := json.NewDecoder(cLog)
|
dec := json.NewDecoder(cLog)
|
||||||
for {
|
for {
|
||||||
var l utils.JSONLog
|
l := &utils.JSONLog{}
|
||||||
if err := dec.Decode(&l); err == io.EOF {
|
|
||||||
|
if err := dec.Decode(l); err == io.EOF {
|
||||||
break
|
break
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
utils.Debugf("Error streaming logs: %s", err)
|
utils.Debugf("Error streaming logs: %s", err)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if (l.Stream == "stdout" && stdout) || (l.Stream == "stderr" && stderr) {
|
if l.Stream == "stdout" && stdout {
|
||||||
fmt.Fprintf(out, "%s", l.Log)
|
fmt.Fprintf(outStream, "%s", l.Log)
|
||||||
|
}
|
||||||
|
if l.Stream == "stderr" && stderr {
|
||||||
|
fmt.Fprintf(errStream, "%s", l.Log)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1240,16 +1245,16 @@ func (srv *Server) ContainerAttach(name string, logs, stream, stdin, stdout, std
|
||||||
go func() {
|
go func() {
|
||||||
defer w.Close()
|
defer w.Close()
|
||||||
defer utils.Debugf("Closing buffered stdin pipe")
|
defer utils.Debugf("Closing buffered stdin pipe")
|
||||||
io.Copy(w, in)
|
io.Copy(w, inStream)
|
||||||
}()
|
}()
|
||||||
cStdin = r
|
cStdin = r
|
||||||
cStdinCloser = in
|
cStdinCloser = inStream
|
||||||
}
|
}
|
||||||
if stdout {
|
if stdout {
|
||||||
cStdout = out
|
cStdout = outStream
|
||||||
}
|
}
|
||||||
if stderr {
|
if stderr {
|
||||||
cStderr = out
|
cStderr = errStream
|
||||||
}
|
}
|
||||||
|
|
||||||
<-container.Attach(cStdin, cStdinCloser, cStdout, cStderr)
|
<-container.Attach(cStdin, cStdinCloser, cStdout, cStderr)
|
||||||
|
|
152
utils/stdcopy.go
Normal file
|
@ -0,0 +1,152 @@
|
||||||
|
package utils
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/binary"
|
||||||
|
"errors"
|
||||||
|
"io"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
StdWriterPrefixLen = 8
|
||||||
|
StdWriterFdIndex = 0
|
||||||
|
StdWriterSizeIndex = 4
|
||||||
|
)
|
||||||
|
|
||||||
|
type StdType [StdWriterPrefixLen]byte
|
||||||
|
|
||||||
|
var (
|
||||||
|
Stdin StdType = StdType{0: 0}
|
||||||
|
Stdout StdType = StdType{0: 1}
|
||||||
|
Stderr StdType = StdType{0: 2}
|
||||||
|
)
|
||||||
|
|
||||||
|
type StdWriter struct {
|
||||||
|
io.Writer
|
||||||
|
prefix StdType
|
||||||
|
sizeBuf []byte
|
||||||
|
}
|
||||||
|
|
||||||
|
func (w *StdWriter) Write(buf []byte) (n int, err error) {
|
||||||
|
if w == nil || w.Writer == nil {
|
||||||
|
return 0, errors.New("Writer not instanciated")
|
||||||
|
}
|
||||||
|
binary.BigEndian.PutUint32(w.prefix[4:], uint32(len(buf)))
|
||||||
|
buf = append(w.prefix[:], buf...)
|
||||||
|
|
||||||
|
n, err = w.Writer.Write(buf)
|
||||||
|
return n - StdWriterPrefixLen, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewStdWriter instanciate a new Writer based on the given type `t`.
|
||||||
|
// the utils package contains the valid parametres for `t`:
|
||||||
|
func NewStdWriter(w io.Writer, t StdType) *StdWriter {
|
||||||
|
if len(t) != StdWriterPrefixLen {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return &StdWriter{
|
||||||
|
Writer: w,
|
||||||
|
prefix: t,
|
||||||
|
sizeBuf: make([]byte, 4),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var ErrInvalidStdHeader = errors.New("Unrecognized input header")
|
||||||
|
|
||||||
|
// StdCopy is a modified version of io.Copy.
|
||||||
|
//
|
||||||
|
// StdCopy copies from src to dstout or dsterr until either EOF is reached
|
||||||
|
// on src or an error occurs. It returns the number of bytes
|
||||||
|
// copied and the first error encountered while copying, if any.
|
||||||
|
//
|
||||||
|
// A successful Copy returns err == nil, not err == EOF.
|
||||||
|
// Because Copy is defined to read from src until EOF, it does
|
||||||
|
// not treat an EOF from Read as an error to be reported.
|
||||||
|
//
|
||||||
|
// The source needs to be writter via StdWriter, dstout or dsterr is selected
|
||||||
|
// based on the prefix added by StdWriter
|
||||||
|
func StdCopy(dstout, dsterr io.Writer, src io.Reader) (written int64, err error) {
|
||||||
|
var (
|
||||||
|
buf = make([]byte, 32*1024+StdWriterPrefixLen+1)
|
||||||
|
bufLen = len(buf)
|
||||||
|
nr, nw int
|
||||||
|
er, ew error
|
||||||
|
out io.Writer
|
||||||
|
frameSize int
|
||||||
|
)
|
||||||
|
|
||||||
|
for {
|
||||||
|
// Make sure we have at least a full header
|
||||||
|
for nr < StdWriterPrefixLen {
|
||||||
|
var nr2 int
|
||||||
|
nr2, er = src.Read(buf[nr:])
|
||||||
|
if er == io.EOF {
|
||||||
|
return written, nil
|
||||||
|
}
|
||||||
|
if er != nil {
|
||||||
|
return 0, er
|
||||||
|
}
|
||||||
|
nr += nr2
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check the first byte to know where to write
|
||||||
|
switch buf[StdWriterFdIndex] {
|
||||||
|
case 0:
|
||||||
|
fallthrough
|
||||||
|
case 1:
|
||||||
|
// Write on stdout
|
||||||
|
out = dstout
|
||||||
|
case 2:
|
||||||
|
// Write on stderr
|
||||||
|
out = dsterr
|
||||||
|
default:
|
||||||
|
Debugf("Error selecting output fd: (%d)", buf[StdWriterFdIndex])
|
||||||
|
return 0, ErrInvalidStdHeader
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve the size of the frame
|
||||||
|
frameSize = int(binary.BigEndian.Uint32(buf[StdWriterSizeIndex : StdWriterSizeIndex+4]))
|
||||||
|
|
||||||
|
// Check if the buffer is big enough to read the frame.
|
||||||
|
// Extend it if necessary.
|
||||||
|
if frameSize+StdWriterPrefixLen > bufLen {
|
||||||
|
Debugf("Extending buffer cap.")
|
||||||
|
buf = append(buf, make([]byte, frameSize-len(buf)+1)...)
|
||||||
|
bufLen = len(buf)
|
||||||
|
}
|
||||||
|
|
||||||
|
// While the amount of bytes read is less than the size of the frame + header, we keep reading
|
||||||
|
for nr < frameSize+StdWriterPrefixLen {
|
||||||
|
var nr2 int
|
||||||
|
nr2, er = src.Read(buf[nr:])
|
||||||
|
if er == io.EOF {
|
||||||
|
return written, nil
|
||||||
|
}
|
||||||
|
if er != nil {
|
||||||
|
Debugf("Error reading frame: %s", er)
|
||||||
|
return 0, er
|
||||||
|
}
|
||||||
|
nr += nr2
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write the retrieved frame (without header)
|
||||||
|
nw, ew = out.Write(buf[StdWriterPrefixLen : frameSize+StdWriterPrefixLen])
|
||||||
|
if nw > 0 {
|
||||||
|
written += int64(nw)
|
||||||
|
}
|
||||||
|
if ew != nil {
|
||||||
|
Debugf("Error writing frame: %s", ew)
|
||||||
|
return 0, ew
|
||||||
|
}
|
||||||
|
// If the frame has not been fully written: error
|
||||||
|
if nw != frameSize {
|
||||||
|
Debugf("Error Short Write: (%d on %d)", nw, frameSize)
|
||||||
|
return 0, io.ErrShortWrite
|
||||||
|
}
|
||||||
|
|
||||||
|
// Move the rest of the buffer to the beginning
|
||||||
|
copy(buf, buf[frameSize+StdWriterPrefixLen:])
|
||||||
|
// Move the index
|
||||||
|
nr -= frameSize + StdWriterPrefixLen
|
||||||
|
}
|
||||||
|
}
|