Commit Graph

310 Commits

Author SHA1 Message Date
Michael Crosby f0e6e135a8 Initial work on selinux patch
This has every container using the docker daemon's pid for the processes
label so it does not work correctly.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-29 03:40:05 -07:00
Sven Dowideit b2c87fe08b add a reference to multiple -H options, and update the other example of -H option
and copy changes to the cli.md file

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
2014-04-24 11:24:58 +10:00
Mike MacCana e62efb266f - unix://path/to/socket should read unix:///path/to/socket like the rest of the documentation (a slash was missing)
- Mention that [] options may be specified multiple times on the Usage page

Docker-DCO-1.1-Signed-off-by: Mike MacCana <mike.maccana@gmail.com> (github: mikemaccana)

Docker-DCO-1.1-Signed-off-by: Mike MacCana <mike.maccana@gmail.com> (github: SvenDowideit)
2014-04-24 11:11:51 +10:00
Michael Crosby 7100ace42b Remove error from engine.New()
Without creating a root there is no way for the engine to return an
error from the new function.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-23 11:54:35 -07:00
Michael Crosby 672edfe807 Remove the concept of a root dir out of engine
This makes the engine more general purpose so that we can
use it and the job routing functionality for reexec'ing our binary
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)

Conflicts:
	integration/runtime_test.go
2014-04-22 19:04:03 -07:00
Vincent Batts cea43f8a2d docker daemon: show info about the server
For combing through logs, have an intro line with information about the
running instance of the docker daemon.

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2014-04-03 10:54:54 -04:00
Victor Vieux a7365a6237 split API into 2 go packages
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-31 18:10:02 +00:00
Victor Vieux aa63ece2ec Merge branch 'master' into discordianfish-https_client
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-19 22:05:36 +00:00
Victor Vieux 12687b7c10 Merge branch 'https_client' of github.com:discordianfish/docker into discordianfish-https_client
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-19 22:03:11 +00:00
Daniel Norberg fbfac21ed4 configurable dns search domains
Add a --dns-search parameter and a DnsSearch
configuration field for specifying dns search
domains.

Docker-DCO-1.1-Signed-off-by: Daniel Norberg <daniel.norberg@gmail.com> (github: danielnorberg)
2014-03-19 10:49:25 -04:00
Victor Vieux c349c9d14a create the cli obj before calling parseCommand
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-14 00:47:13 +00:00
Ken ICHIKAWA b7ae9984fb Update daemon docs and help messages for --iptables and --ip-forward
Fix docs and help messages of --iptables and --ip-forward to describe the true case behaviour

Docker-DCO-1.1-Signed-off-by: Ken ICHIKAWA <ichikawa.ken@jp.fujitsu.com> (github: ichik1)
2014-03-12 13:50:03 +09:00
Victor Vieux fde5f573d3 move opts out of pkg because it's related to docker
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-10 21:10:23 +00:00
Johannes 'fish' Ziemke c000cb6471 Add authenticated TLS support for API
Docker-DCO-1.1-Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org> (github: discordianfish)
2014-03-09 00:06:44 +01:00
Evan Krall 644acec2f7 Create a -G option that specifies the group which unix sockets belong to.
Docker-DCO-1.1-Signed-off-by: Evan Krall <krall@yelp.com> (github: EvanKrall)
2014-03-06 11:17:04 -08:00
unclejack d761ebea6f Merge pull request #4382 from unclejack/fix_symlink_handling
handle symlinks for Docker's root dir & TMPDIR
2014-03-04 03:23:11 +02:00
unclejack 611acf7a7c handle symlinks for Docker's root dir & TMPDIR
This removes the incomplete symlink handling from engine.go and it adds
it one place in docker.go.

It also enables handling symlinks for TMPDIR.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-03-03 23:00:53 +02:00
Michael Crosby de083400b8 Address initial feedback from pr
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-25 10:54:41 -08:00
Michael Crosby d59c05a37c Fix exec driver flag, rename new driver to 'native'
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-24 20:41:09 -08:00
Michael Crosby 27a43692c2 Merge branch 'master' into add-libcontainer
Conflicts:
	runtime.go

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-24 20:35:12 -08:00
Michael Crosby c9addff444 Merge pull request #4189 from vbatts/vbatts-execdriver_flag
execdriver flag for docker daemon
2014-02-24 23:28:17 -05:00
Michael Crosby 01f9815b55 Fix tests with dockerinit lookup path
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-24 13:40:17 -08:00
Michael Crosby 8f20058307 Compile nsinit into docker for use with dockerinit
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-24 12:21:13 -08:00
Solomon Hykes 919665a20a Register built-in engine commands at runtime instead of compile-time
This allows selective loading of commands, and paves the way to dynamic
plugins.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-24 19:24:29 +00:00
Danny Berger 8c4160fe61 Fix cli argument usage typo for docker --mtu
Docker-DCO-1.1-Signed-off-by: Danny Berger <dpb587@gmail.com> (github: dpb587)
2014-02-21 10:51:51 -05:00
Vincent Batts 5f84d7f314 execdriver flag for docker daemon
like the storage-driver flag, this implements a flag for choosing the
  execdriver to be used, defaulting to lxc.

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2014-02-17 20:03:53 -05:00
Victor Vieux 4187f4e750 Merge pull request #4168 from crosbymichael/add-listenbuffer
Hold connections until the daemon has fully loaded
2014-02-17 16:04:49 -08:00
Guillaume J. Charmes 513d864880
Fix DOCKER_HOST=tcp:// panic
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-02-17 11:35:26 -08:00
Michael Crosby 778f1bf663 Integration generic socket wait for docker api
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-15 20:49:50 -08:00
Solomon Hykes 44e10433c7 api/container.go: an API-specific representation of a container
This breaks the dependency from the remote API implementation to the
internal representation of a container. Instead it uses its own partial
representation of a container, with only required fields.

* This preserves reverse-compatibility with all past implementations of the remote API.

* This clarifies which fields are guaranteed to be present in a response
	A docker remote api server *may* return more fields in a Container
	object, but their presence and semantics are not guaranteed and should
	not be relied upon by client implementations.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-15 23:24:51 +00:00
Solomon Hykes ee59ba969f Move remote api client to api/
This moves `commands.go` out of the core and into `api/client.go`

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-15 14:55:51 -08:00
Victor Vieux 9a9690360c Merge pull request #4074 from shykes/separate-version
Move docker version introspection to a sub-package.
2014-02-11 20:16:00 -08:00
Solomon Hykes e6e320acc7 pkg/opts: a collection of custom value parsers implementing flag.Value
This facilitates the refactoring of commands.go.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-11 19:59:52 -08:00
Solomon Hykes e08a1c53aa Move api-specific code to the api package
This facilitates the refactoring of commands.go.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-11 19:59:52 -08:00
Solomon Hykes ae3c7dec3b Move docker version introspection to a sub-package.
This facilitates the refactoring of commands.go.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-11 16:10:51 -08:00
Johan Euphrosine 92e61f89aa docker/config: update -mtu flag default
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: google)
2014-02-03 15:36:39 -08:00
Johan Euphrosine 4d0a026c98 docker: detect defaultNetworkMtu from default route
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: google)
2014-02-01 03:46:37 -08:00
Guillaume J. Charmes 819c2e3eca Merge pull request #3872 from crosbymichael/network-driver
Remove networking out of core and into a driver
2014-01-31 17:22:37 -08:00
Victor Vieux 9eea7f28f0 Move serveapi to api/api.go
Remove api import from server.go
Rename initapi to init server

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-31 23:06:00 +00:00
Michael Crosby cb3bd91689 Fix IP case for BridgeIP
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-31 12:18:45 -08:00
Victor Vieux f556cd4186 move api to it's own package
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-29 19:26:54 +00:00
Victor Vieux d41844ed2d remove enableCors from the config and move it as a job arg
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-29 00:20:51 +00:00
Michael Crosby 2723133a69 Merge pull request #3105 from philips/add-socket-activation
Add socket activation
2014-01-28 11:38:25 -08:00
Tianon Gravi cabe624c82 Add --ip-forward flag to daemon (enabled by default) which automatically sets "net.ipv4.ip_forward" to 1
See also https://groups.google.com/d/topic/docker-dev/DCjF5Prx7HA/discussion

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-01-27 21:35:05 -07:00
Brandon Philips cfeb1f0f65 fix(docs): fixup based on changes in master
Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
2014-01-27 17:18:09 -08:00
Victor Vieux e71dbf4ee5 update commands.go
update docker.go

move to pkg

update docs

update name and copyright

change --sinceId to --since-id, update completion and docs

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor@docker.com> (github: vieux)
2014-01-17 17:33:15 -08:00
Michael Crosby f50b8b08b5 Add DOCKER_HOST env var for client
This env var will set the -H flag on the docker
client.
2013-12-28 16:42:18 -08:00
Michael Crosby 566ff54d0d Allow mtu to be configured at daemon start 2013-12-20 12:12:03 -05:00
Josh Poimboeuf 94821a3353 Move root symlink check to engine.New
Since commit c91c365, when starting the docker daemon without an
existing /var/lib/docker directory, it fails with:

  2013/12/18 23:39:36 Unable to canonicalize root (%!s(*string=0xc210077c80)): lstat /var/lib/docker: no such file or directory

Move the symlink checking code to engine.New after the root dir has been
created.
2013-12-19 00:39:12 -06:00
Tianon Gravi c91c365f88 Canonicalize our root path before we try using it, because we make assumptions about it not containing symlinks
Fixes #3242
2013-12-18 11:15:09 -07:00
WarheadsSE a68d7f3d70 Add -bip flag: allow specification of dynamic bridge IP via CIDR
e.g.:

```
docker -d -bip "10.10.0.1/16"
```

If set and valid, use provided in place of trial and error from pre-defined array in network.go.
Mutually exclusive of -b option.
2013-12-13 10:47:19 -05:00
JP 3cd9b2aadf Fixes #2820 2013-12-02 16:22:39 -05:00
Michael Crosby fe571dd293 Merge pull request #2829 from dotcloud/refactor_opts
Refactor opts
2013-12-02 10:41:30 -08:00
Johannes 'fish' Ziemke b04c6466cd Make docker build return exit code of build step
If a command during build fails, `docker build` now returns with
the exit code of that command.

This makes it necessary to change the build api endpoint to
return a json object stream.
2013-12-02 17:52:37 +01:00
Guillaume J. Charmes 5e3f6e7023 Change the default Host affectation to not rely on slice 2013-11-26 18:31:59 +00:00
Guillaume J. Charmes 1beb5005d1 Format main() 2013-11-26 17:47:58 +00:00
Guillaume J. Charmes 1ba11384bf Refactor Opts 2013-11-26 17:46:06 +00:00
Michael Crosby b4eeb6be61 Change graph-driver flag to be s 2013-11-25 09:43:32 -08:00
Tianon Gravi 1ab6b8bf49 Update a few flag help strings for consistency and clarity 2013-11-21 12:30:17 -07:00
Michael Crosby 6dbeed89c0 Add flag to set default graph driver
Remove the env var DOCKER_DRIVER
2013-11-19 02:37:44 -08:00
Solomon Hykes 6c4393ccbb Merge branch 'job-create-start-clean' into engine-patch-2
Conflicts:
	engine/engine.go
	engine/job.go
	server.go
	utils_test.go
2013-11-13 00:36:20 +00:00
Guillaume J. Charmes 6998c3c387
go fmt 2013-11-07 12:27:33 -08:00
Solomon Hykes 5c42b2b512 Fix main() 2013-11-05 23:00:20 +00:00
Solomon Hykes 02ddaad5d9 Engine: optional environment variable 'Logging' in 'serveapi' 2013-11-05 18:39:59 +00:00
Solomon Hykes 433c8e9c7d Separate a) initialization of the http api and b) actually serving the api into 2 distinct jobs 2013-11-05 17:41:37 +00:00
Victor Vieux e3c49843d7 Merge pull request #2494 from shykes/engine-links
Engine: Minimal, unintrusive implementation of a cleaner Job API.
2013-10-31 16:32:49 -07:00
Victor Vieux f7c40a87f3 set containers comm to true by default 2013-10-30 14:48:19 -07:00
Solomon Hykes a13241d370 Engine: Engine.Job() never fails, to mimic the os/exec API (and make usage less verbose) 2013-10-26 17:49:16 -07:00
Solomon Hykes c1ae1a0e1c Setup daemon pidfile/cleanup in Server.Daemon() instead of main() 2013-10-26 14:26:07 -07:00
Solomon Hykes 7e691e11b0 Rename 'GraphPath' to the more logical 'Root'. This does not affect users except for a slight text change in the usage messge 2013-10-26 14:24:13 -07:00
Solomon Hykes 0d1a825137 Minimal, unintrusive implementation of a cleaner Job API.
* Implement a new package: engine. It exposes a useful but minimalist job API.
* Refactor main() to instanciate an Engine instead of a Server directly.
* Refactor server.go to register an engine job.

This is the smallest possible refactor which can include the new Engine design
into master. More gradual refactoring will follow.
2013-10-26 14:18:13 -07:00
Michael Crosby 7c08aeeba4 Use persistent connection for links database
Add close method to Runtime and Server to make sure
that any underlying connections are cleaned up
2013-10-25 15:13:25 -07:00
Alexander Larsson db99966724 Move SysInit to a submodule
This allows docker-init to not import the main docker
module, which means it won't e.g. pick up any sqlite
dependencies.
2013-10-25 15:13:24 -07:00
Alexander Larsson d063c8d941 Move ListOps to utils submodule
This will be needed for later use in docker-init without a docker
dependency
2013-10-25 15:13:24 -07:00
Michael Crosby ce965b8c43 Add flag for inter-container communication 2013-10-25 15:13:24 -07:00
Michael Crosby 1cbdaebaa1 Add links for container relationships and introspection 2013-10-25 15:13:24 -07:00
Victor Vieux 92384649cf remove useless os.Exit() after log.Fatalf 2013-10-24 00:25:55 -07:00
Yang Bai e81da876df let utils.ParseHost return err when errors happen 2013-10-24 13:23:02 +08:00
Victor Vieux e594c788e4 keep -r, but default true 2013-10-03 22:42:35 +00:00
Victor Vieux 46a1cd69a9 only os.Exits on error 2013-09-09 21:26:35 +00:00
jbbarth d80b50d4b4 Improve formatting with 'go fmt' as stated in CONTRIBUTING.md
As 'go fmt' doesn't support verifying files in multiple directories,
it's probably a good idea to run it on all '*.go' files from time to
time with something like this:

  find . -name "*.go" | xargs dirname | sort -u | xargs -n 1 echo go fmt
2013-08-27 10:05:25 +02:00
Solomon Hykes 9fce6f662a docker -v: show version and build information without making remote connections 2013-08-20 19:32:37 -07:00
Solomon Hykes 9087ef9a77 Move VERSION to a dedicated file to facilitate automated builds and releases 2013-08-20 19:32:37 -07:00
Pascal Borreli 9b2a5964fc Fixed typos 2013-08-12 18:53:06 +01:00
Michael Crosby 8934f13615 Change daemon to listen on unix socket by default 2013-08-06 00:12:56 +00:00
Guillaume J. Charmes f6fa353dd8 Merge pull request #1267 from sridatta/new-clean-init
* Runtime: Fix to "Inject dockerinit at /.dockerinit"
2013-08-05 13:23:22 -07:00
Stefan Praszalowicz 964e826a9b Document -b none 2013-07-21 18:01:52 -07:00
Solomon Hykes 5d8efc107d + Runtime: inject dockerinit at /.dockerinit instead of overwriting /sbin/init. This makes it possible to run /sbin/init inside a container. 2013-07-17 17:13:34 -07:00
Caleb Spare da3962266a Gofmt -s (simplify) 2013-07-03 14:35:18 -07:00
Victor Vieux 862e223cec Merge branch 'add-daemon-storage-path-param' of https://github.com/heavenlyhash/docker into heavenlyhash-add-daemon-storage-path-param 2013-06-25 13:33:45 +00:00
Eric Myhre e44f62a95c Add argument to allow setting base directory for docker daemon's storage to values other than "/var/lib/docker". 2013-06-20 16:29:54 -05:00
Solomon Hykes e43323221b Merge branch 'master' into simpler-build-upload
Conflicts:
	api.go
	builder_client.go
	commands.go
2013-06-20 14:19:09 -07:00
Victor Vieux dede1585ee add the possibility to use multiple -H 2013-06-19 12:31:54 +00:00
Victor Vieux 3adf9ce04e add basic support for unix sockets 2013-06-18 18:59:56 +00:00
Solomon Hykes 250e47e2eb Merge branch 'dns_server_side'
+ Configure dns configuration host-wide with 'docker -d -dns'
+ Detect faulty DNS configuration and replace it with a public default
2013-06-14 14:39:05 -07:00
Victor Vieux 20bf0e00e8 * Remote Api: Add flag to enable cross domain requests 2013-06-11 10:12:36 +00:00
Guillaume J. Charmes afd325a884 Solve an issue with the -dns in daemon mode 2013-06-06 11:01:29 -07:00
Guillaume J. Charmes 84d68007cb Add -dns to docker daemon 2013-06-05 14:20:54 -07:00
Victor Vieux fd224ee590 linted names 2013-06-04 18:00:22 +00:00
Michael Crosby 6d5bdff394 Add flag to enable cross domain requests in Api
Add the -api-enable-cors flag when running docker
in daemon mode to allow CORS requests to be made to
the Remote Api.  The default value is false for this
flag to not allow cross origin request to be made.

Also added a handler for OPTIONS requests the standard
for cross domain requests is to initially make an
OPTIONS request to the api.
2013-06-03 21:39:00 -04:00
Guillaume J. Charmes bfb65b733a Simplify the Host flag parsing 2013-05-24 11:31:36 -07:00
Guillaume J. Charmes ae72c2f4d6 Gofmt 2013-05-24 11:31:19 -07:00
Victor Vieux 92e4a51965 use -H 2013-05-24 16:49:18 +00:00
Victor Vieux 59835135c5 added warning 2013-05-23 16:15:36 +00:00
Victor Vieux 13f1939a63 switch to default 127.0.0.1, and mixed the two flags in one. -h 2013-05-23 16:09:28 +00:00
Victor Vieux a3ccec197e add -host and -port 2013-05-21 10:14:58 +00:00
Guillaume J. Charmes 2e69e1727b Create a subpackage for utils 2013-05-14 22:37:35 +00:00
Victor Vieux c423a790d6 fixed issue with viz 2013-05-09 23:52:12 +02:00
Victor Vieux 04cd20fa62 split api and server. run return exit code. import, pull and commit uses the smae endpoint. non zero status code on failure 2013-05-06 11:31:22 +02:00
Victor Vieux 4f0bda2dd5 up to date with master 2013-05-02 18:36:23 +02:00
Guillaume J. Charmes 50144aeb42 Add -r flag to dockerd in order to restart previously running container. Fixes #26 2013-04-24 19:01:23 -07:00
Guillaume J. Charmes f079fbe3fa Check that the pid in pidfile exists before preventing docker to start 2013-04-22 15:57:31 -07:00
Guillaume J. Charmes f68d107a13 Remove the NO_MEMORY_LIMIT constant 2013-04-18 21:08:20 -07:00
Victor Vieux c0d5d5969b skeleton remote API, only version working (wip) 2013-04-18 03:13:43 +02:00
Solomon Hykes a11b31399b Skeleton of http API 2013-04-16 19:53:08 +02:00
Solomon Hykes 2a47df0202 Disabled standalone mode (fixes #364) 2013-04-15 11:44:11 -07:00
Guillaume J. Charmes 1967c8342a Allow to disable memory limit at compilation time 2013-04-12 10:48:20 -07:00
Guillaume J. Charmes 22893429ed Go fmt 2013-04-12 07:37:24 -07:00
Flavio Castelli fb0b375be7 docker daemon: create file containing PID
Ensure the docker daemon creates a file containing its PID under
/var/run/docker.pid.

The daemon takes care of removing the pid file when it receives either
SIGTERM, SIGINT or SIGKILL.

The daemon also refuses to start when the pidfile is found. An
explanation message is shown to the user when this happens.

This change is required to make docker easier to manage by tools like
checkproc which rely on this information.
2013-04-11 21:41:08 +02:00
Guillaume J. Charmes 246eed52de Move DockerLocalConn and terminal functions form package "main" to "rcli" in order to be able to use DockerLocalConn in commands_test.go 2013-04-08 15:58:09 -07:00
Louis Opter b306a60738 Simplification in the goroutine that restore the terminal state on SIGINT 2013-04-08 15:58:09 -07:00
Louis Opter 7d0ab3858e Only set the terminal in raw mode for commands which need it
The raw mode is actually only needed when you attach to a container.
Having it enabled all the time can be a pain, e.g: if docker crashes
your terminal will end up in a broken state.

Since we are currently missing a real API for the docker daemon to
negotiate this kind of options, this changeset actually enable the raw
mode on the login (because it outputs a password), run and attach
commands.

This "optional raw mode" is implemented by passing a more complicated
interface than io.Writer as the stdout argument of each command. This
interface (DockerConn) exposes a method which allows the command to set
the terminal in raw mode or not.

Finally, the code added by this changeset will be deprecated by a real
API for the docker daemon.
2013-04-08 15:58:09 -07:00
Solomon Hykes 22adb52c0a The flag to use a pre-existing bridge interface is '-b'. Added explanation 2013-04-05 14:16:04 -07:00
Guillaume J. Charmes 1b370f9d8d Move the default bridge name to a constant 2013-04-04 05:33:28 -07:00
Guillaume J. Charmes f39af7e05d Put the bridge interface name in the command line 2013-04-03 16:15:43 -07:00
Solomon Hykes 35c68944c7 Merged shawnsi/git-version 2013-04-02 20:26:22 -07:00
Solomon Hykes 7666307931 Use an environment variable to activate debug mode, instead of a package-specific flag 2013-04-02 10:58:16 -07:00
Shawn Siefkas 37a78902db Adding git commit to the version output
The Makefile must be used in order to inject the git commit
via -ldflags.
2013-04-01 13:52:45 -05:00
Solomon Hykes c937e237ad Merged Ctrl-C interception by @creack 2013-03-29 13:12:04 -07:00
Jonathan Rudenberg a6da7f138c Camelize some snake_case variable names 2013-03-28 20:12:23 -04:00
Guillaume J. Charmes 6a236184af Change hardcoded "0" onto os.Stdin.Fd() 2013-03-27 23:56:36 -07:00
Guillaume J. Charmes 108acc0511 #214 Better signal handling 2013-03-27 23:54:53 -07:00
Guillaume J. Charmes 6e507b9460 Add a Debugf() helper and a -D (debug) flag to docker 2013-03-22 11:44:12 -07:00
Solomon Hykes 623e91e2e3 Moved Go() to the main package... And got rid of the useless docker/future package 2013-03-21 01:13:55 -07:00
creack e5e66716df Move commands into docker 2013-03-14 02:43:16 -07:00
Solomon Hykes 745edc49cd Merge dockerd into docker. 'docker -d' runs in daemon mode. For all other commands, docker auto-detects whether to run standalone or to remote-control the daemon 2013-03-13 00:29:40 -07:00
Solomon Hykes 86854ffbc5 Merged master 2013-03-12 21:53:34 -07:00
Solomon Hykes d2cba75d5f Removed interactive mode ('docker -i'). Cool UI experiment but seems more trouble than it's worth 2013-03-12 15:05:41 -07:00
creack 453d49573c Put back the github.com path for the import 2013-03-12 11:59:27 -07:00
Guillaume J. Charmes 18f4e7e196 Put back the relative paths for dev purpose 2013-03-12 05:17:51 -07:00
Guillaume J. Charmes 687d6f25ee Change relative paths to absolute 2013-03-11 02:59:52 -07:00
shin- 5d6199b925 post-merge repairs 2013-03-11 07:39:06 -07:00
Solomon Hykes aa12da6f50 go fmt 2013-02-26 17:26:46 -08:00
Solomon Hykes e1b25e9b08 Moved server and client logic into sub-packages docker/server and docker/client, respectively. The UI is not affected. 2013-02-13 17:10:00 -08:00
Solomon Hykes 45c30b8eda 'docker -i' can be used as an interpreter for scripts (#!/usr/bin/env docker -i) 2013-02-12 22:24:15 -08:00
Solomon Hykes f20deac47f Clean up list of available commands 2013-02-12 17:25:41 -08:00
Solomon Hykes d0b6f7ef3b docker -i: interactive mode 2013-02-12 08:48:30 -08:00
Solomon Hykes f330c2a248 Disabled remote access to dockerd. Preferred usage is over ssh. 2013-02-12 08:37:12 -08:00
Solomon Hykes edc9968604 Clearer error message in the client when DOCKER env variable is not set 2013-02-04 23:25:28 -08:00
Solomon Hykes d5be77075a Fix a bug which caused the client to never exit in interactive mode when NORAW is set. 2013-01-29 15:37:54 -08:00
Solomon Hykes 8c142c6127 export NORAW=1 to disable raw mode in the client 2013-01-29 15:24:39 -08:00
Solomon Hykes c283ff6675 Fixed typo in Darwin termios settings 2013-01-28 18:37:54 -08:00
shin- c914aaf43e Forgot an import in termios_darwin 2013-01-28 17:07:38 -08:00
shin- 08ac1d0b35 Different termios for linux/darwin 2013-01-28 17:06:46 -08:00
Solomon Hykes 75529a202f Fixed IO edge cases on docker client. Wait for stdin to close before exiting if it's a pipe, but not if it's a terminal. Correctly send stdin EOF to the server with TCP half-close 2013-01-25 11:26:18 -08:00
Solomon Hykes f3ffba7afe Factored out docker/rcli (remote cli protocol), docker/fake (mocking utilities) and docker/future (real utilities which don't yet fit in the core) 2013-01-24 20:01:32 -08:00
Solomon Hykes 553ca56d7e Enabled stdin and interactive mode. 'docker run -a CONTAINER bash' will now correctly run an interactive shell. This required switching to a simple raw TCP protocol by default 2013-01-23 23:14:46 -08:00
Solomon Hykes d62a759106 Moved 100% of arg parsing to dockerd. Even help messages are generated on the server 2013-01-20 00:44:44 -08:00
Solomon Hykes 3dc240c7ee CLI: don't crash with no arguments 2013-01-19 17:41:59 -08:00
Solomon Hykes e5323e7c9a Prototyping with a mock CLI and daemon 2013-01-19 16:07:19 -08:00