Commit graph

32 commits

Author SHA1 Message Date
Chris Bednarski 9455370d8e Merge branch 'master' into f-docker-config-cleanup 2015-09-26 21:52:02 -07:00
Chris Bednarski 5678859752 Add configuration option for whether Nomad will clean up containers and images when they are no longer used 2015-09-26 18:53:15 -07:00
Chris Bednarski 79488baa4d Add all containers when searching for images that are still in used, since the container using the image may be stopped 2015-09-26 18:51:36 -07:00
Chris Bednarski af314b0f4d Log an info when an image can't be removed because it's still in use 2015-09-26 00:34:57 -07:00
Chris Bednarski 5632a33036 Use env.Get, remove sha256 checks, and change from regexp to strconv to test for int 2015-09-25 23:55:01 -07:00
Chris Bednarski 7021ac3ce8 Add docker 'command' to docs; cleanup some comments 2015-09-25 23:28:23 -07:00
Chris Bednarski 23407c54af Replace docker version and docker ps with native calls; no more exec! 2015-09-25 23:13:40 -07:00
Chris Bednarski 72cd22347f Docker kill now exits with an error, as expected 2015-09-25 22:43:19 -07:00
Chris Bednarski 0c31a83783 Go native for docker API calls 2015-09-25 20:01:03 -07:00
Chris Bednarski efb7c409bb Improve handling of tagged docker images
- Converted Start() to use docker native client throughout
- Better handling of latest vs. tagged images
    - We can now support multiple versions of an image
    - We will now not download a tag if we already have it
2015-09-25 18:22:10 -07:00
Chris Bednarski d2aa4fd53c Merge pull request #104 from hashicorp/f-docker-static-ports
Add static (reserved) ports for docker
2015-09-24 15:44:41 -07:00
Chris Bednarski 40ce6ece41 Get only one version of a docker container 2015-09-24 14:07:28 -07:00
Chris Bednarski f8e8084c71 Rename containerConfigForTask to createContainer to mirror the docker api call; other helper functions will follow this convention too 2015-09-24 00:00:46 -07:00
Chris Bednarski a071bb6d59 Rename containerConfig to hostConfig since there are two types of container configs 2015-09-23 23:57:04 -07:00
Chris Bednarski 9ff0e88d33 Added static / reserved port allocations to docker 2015-09-23 23:45:34 -07:00
Chris Bednarski 1978be24d0 Format as string instead of casting to string 2015-09-23 19:29:53 -07:00
Chris Bednarski e413c6f9d2 Support mapped ports and labelled ports for docker 2015-09-23 18:19:01 -07:00
Chris Bednarski 1654d08fca Add docker ports; change to uppercase examples and tests 2015-09-23 18:01:08 -07:00
Chris Bednarski 9067b2594f Added environment variables to docker 2015-09-22 23:12:24 -07:00
Chris Bednarski 09249d877c Removed comment that's no longer relevant 2015-09-22 20:11:07 -07:00
Chris Bednarski da93d4a30f Change error to err to be consistent with other usage 2015-09-11 10:26:33 -07:00
Chris Bednarski 4f83bc7090 Fix typos 2015-09-10 11:35:03 -07:00
Chris Bednarski 2ccad3d6e8 Change panic to a more helpful message 2015-09-09 19:04:06 -07:00
Chris Bednarski 237bf5f68e Merge branch 'f-driver-config' into f-docker-resource-constraints 2015-09-09 18:47:35 -07:00
Chris Bednarski a695e311dc Replace logging and config with DriverContext, which allows us to expand the dependency injection without changing the interface 2015-09-09 18:06:23 -07:00
Chris Bednarski 9965d28a22 Add logger to the dockerHandle created by Open() 2015-09-09 13:43:28 -07:00
Chris Bednarski a731a84136 Cleanup based on PR feedback
- Add validation that Resources.MemoryMB and Resources.CPU have non-zero values
- Change log calls to use logger whenever possible
- Change log format to add colon after driver.docker
2015-09-09 13:35:10 -07:00
Chris Bednarski b70b852662 Added preliminary resource constraints for docker; CPU and Memory 2015-09-09 01:08:31 -07:00
Chris Bednarski 4eb8fc5188 Added config to drivers; needed for docker driver to get the socket endpoint 2015-09-08 12:43:02 -07:00
Chris Bednarski 813f905a1c Removed debug logging 2015-09-03 21:08:14 -07:00
Chris Bednarski c483036e16 Added tests for docker, improved logging, and fixed a few bugs 2015-09-03 21:00:16 -07:00
Chris Bednarski b9ceb69683 Added initial implementation for the docker driver; tests pending 2015-09-03 12:35:22 -07:00