Commit Graph

24 Commits

Author SHA1 Message Date
Solomon Hykes ea2fba5ce0 Engine: optional Logging field to disable custom logging in engine.
* The default behavior is preserved
* This disables the use of the `TEST` environment variable in engine.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-07 21:41:25 +00: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
Solomon Hykes cd846ecb60 Engine: builtin command 'commands' returns a list of registered commands
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-24 12:29:49 -08:00
Solomon Hykes 62b21daded Engine: cleanup side effects between tests
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-24 12:29:39 -08:00
Solomon Hykes 2019a73f03 Engine.ParseJob: create a new job from a shell-like text command.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-24 11:38:13 -08:00
Victor Vieux 9dcbdbc4b1 move pull and import to a job
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-24 14:46:31 -08:00
Victor Vieux 8cbabf2c3e clean up test log
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-16 16:07:42 -08: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
Victor Vieux 0025e9bd71 Merge pull request #3113 from shykes/engine-export
Move 'docker export' to the engine API
2013-12-10 13:28:24 -08:00
Solomon Hykes a80c059bae Engine: break out Env utilities into their own type - Env 2013-12-08 06:06:05 +00:00
Solomon Hykes 50f3a696bd Engine: don't log job stdout to engine stdout (it might be non-text output, for example tar data for 'export' 2013-12-08 01:33:05 +00:00
Michael Crosby 25d3db048e Enable engine to take Stderr and Stdout for mocking in tests 2013-12-06 01:18:18 -08:00
Josh Poimboeuf e4aba11e80 add env variable to disable kernel version warning
Allow the user to set DOCKER_NOWARN_KERNEL_VERSION=1 to disable the
warning for RHEL 6.5 and other distributions that don't exhibit the
panics described in https://github.com/dotcloud/docker/issues/407.
2013-12-02 15:56:51 -06:00
Solomon Hykes a4f8a2494b Engine: integer job status, improved stream API
* Jobs return an integer status instead of a string
* Status convention mimics unix process execution: 0=success, 1=generic error, 127="no such command"
* Stdout and Stderr support multiple thread-safe data receivers and ring buffer filtering
2013-11-30 00:25:46 +00:00
Solomon Hykes b00d5f0185 gofmt 2013-11-13 19:25:55 +00: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 e5f8ab6160 Engine: 'create' creates a container and prints its ID on stdout 2013-11-05 23:00:20 +00:00
Solomon Hykes 4e7cb37dcc Engine: improved logging and identification of jobs 2013-11-05 18:39:59 +00:00
Solomon Hykes 847411a1ee Engine: fix a bug which caused handlers to be shared between multiple engine instances 2013-11-05 18:39:59 +00:00
Solomon Hykes 958b4a8757 Engine: 'start' starts the specified container 2013-11-05 18:39:59 +00: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 1b8eef4efb Engine: centralize checks for supported architectures and kernel versions 2013-10-26 14:21:04 -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