diff --git a/.gitignore b/.gitignore index 2b75f797f5..7c99eb899d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ +docker +dockerd .*.swp a.out diff --git a/NOTICE b/NOTICE index 1731678b47..f55cc6950a 100644 --- a/NOTICE +++ b/NOTICE @@ -2,3 +2,5 @@ Docker Copyright 2012-2013 dotCloud, inc. 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. \ No newline at end of file diff --git a/README.md b/README.md index 0764c60d6a..42fd479b70 100644 --- a/README.md +++ b/README.md @@ -138,14 +138,16 @@ Standard Container Specification Setup instructions ================== -Supported hosts ---------------- +Requirements +------------ -Right now, the officially supported hosts are: +Right now, the officially supported distributions are: + +* Ubuntu 12.04 (precise LTS) * Ubuntu 12.10 (quantal) -Hosts that might work with slight kernel modifications, but are not officially supported: -* Ubuntu 12.04 (precise) +Docker probably works on other distributions featuring a recent kernel, the AUFS patch, and up-to-date lxc. However this has not been tested. + Step by step host setup ----------------------- @@ -156,11 +158,11 @@ Step by step host setup apt-get update apt-get install lxc wget - debootstrap --arch=amd64 quantal /var/lib/docker/images/ubuntu/ -4. Download the latest version of the [docker binaries](https://dl.dropbox.com/u/20637798/docker.tar.gz) (`wget https://dl.dropbox.com/u/20637798/docker.tar.gz`) +4. Download the latest version of the [docker binaries](https://dl.dropbox.com/u/20637798/docker.tar.gz) (`wget https://dl.dropbox.com/u/20637798/docker.tar.gz`) (warning: this may not be the most up-to-date build) 5. Extract the contents of the tar file `tar -xf docker.tar.gz` 6. Launch the docker daemon `./dockerd` +7. Download a base image by running 'docker pull -j base' Client installation diff --git a/client/client.go b/client/client.go index 164e1be321..5a8aac3807 100644 --- a/client/client.go +++ b/client/client.go @@ -112,7 +112,7 @@ func InteractiveMode(scripts ...string) error { return err } io.WriteString(rcfile, "enable -n help\n") - os.Setenv("PATH", tmp) + os.Setenv("PATH", tmp + ":" + os.Getenv("PATH")) os.Setenv("PS1", "\\h docker> ") shell := exec.Command("/bin/bash", append([]string{"--rcfile", rcfile.Name()}, scripts...)...) shell.Stdin = os.Stdin diff --git a/client/term.go b/client/term.go index 8b58611cd9..ed52be96b4 100644 --- a/client/term.go +++ b/client/term.go @@ -125,7 +125,9 @@ func MakeRaw(fd int) (*State, error) { } newState := oldState.termios - newState.Iflag &^= istrip | INLCR | ICRNL | IGNCR | IXON | IXOFF + newState.Iflag &^= ISTRIP | INLCR | IGNCR | IXON | IXOFF + newState.Iflag |= ICRNL + newState.Oflag |= ONLCR newState.Lflag &^= ECHO | ICANON | ISIG if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), uintptr(setTermios), uintptr(unsafe.Pointer(&newState)), 0, 0, 0); err != 0 { return nil, err diff --git a/docker.go b/docker.go index 0885de3809..b5ee2bb848 100644 --- a/docker.go +++ b/docker.go @@ -120,7 +120,7 @@ func NewFromDirectory(root string) (*Docker, error) { Store: store, } - if err := os.Mkdir(docker.repository, 0700); err != nil && !os.IsExist(err) { + if err := os.MkdirAll(docker.repository, 0700); err != nil && !os.IsExist(err) { return nil, err } diff --git a/image/image.go b/image/image.go index 7f635d1338..82c88b2a05 100644 --- a/image/image.go +++ b/image/image.go @@ -27,6 +27,9 @@ func New(root string) (*Store, error) { if err != nil { return nil, err } + if err := os.MkdirAll(abspath, 0700); err != nil && !os.IsExist(err) { + return nil, err + } layers, err := NewLayerStore(path.Join(root, "layers")) if err != nil { return nil, err diff --git a/server/server.go b/server/server.go index 1cf01eb688..8a3bb404f3 100644 --- a/server/server.go +++ b/server/server.go @@ -11,7 +11,6 @@ import ( "github.com/dotcloud/docker/image" "github.com/dotcloud/docker/rcli" "io" - "log" "net/http" "net/url" "os" @@ -774,9 +773,7 @@ func (srv *Server) CmdRun(stdin io.ReadCloser, stdout io.Writer, args ...string) } if *fl_attach { future.Go(func() error { - log.Printf("CmdRun(): start receiving stdin\n") _, err := io.Copy(cmd_stdin, stdin) - log.Printf("CmdRun(): done receiving stdin\n") cmd_stdin.Close() return err })