Commit Graph

72 Commits

Author SHA1 Message Date
Daniel Nephin c48ee5caef Add a new fig command for retrieving the locally bound port of a service.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2014-09-04 22:09:12 -04:00
Ben Firshman 2827786886 Merge pull request #364 from docker/non-numeric-link-alias
Non-numeric link alias
2014-09-04 20:39:18 +01:00
Daniel Nephin 24044fa704 Some additional validation for container ports, and a couple extra test cases.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2014-08-31 02:00:58 -04:00
Daniel Nephin 07fa169fd2 Resolves #260, #301 and #449
Adds ~ support and ro mode support for volumes, along with some additional validation.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2014-08-31 02:00:52 -04:00
Daniel Nephin 294453433d Remove extra calls to docker server.
Fix broken integration tests

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2014-08-10 11:24:20 -04:00
Aanand Prasad 62a4d214e8 Default link alias which is just the service name
Closes #37.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2014-08-08 13:05:42 -07:00
Daniel Nephin 50a24bc3bf Add flake8 and fix errors.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2014-07-27 08:51:17 -07:00
Mark Steve Samson 47bbc35b74 Add `--no-cache` option to `fig build` (Closes #152)
Signed-off-by: Mark Steve Samson <hello@marksteve.com>
2014-07-20 11:28:28 +08:00
Aanand Prasad 140ced6a3b Fix and document `dns:` option
Closes #240.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2014-07-17 18:11:50 -07:00
Ben Firshman f983110492 Remove empty lists from default Service args
This will cause terrifying bugs.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2014-07-11 16:07:31 -07:00
Ben Firshman bb89f85984 Remove stop timeout in recreate containers
This doesn't seem like a good idea – 1 second isn't enough time
to stop gracefully.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2014-07-11 14:53:56 -07:00
Ben Firshman b573b87a92 Fix race condition in recreate containers
Container might have stopped between checking `is_running` and
calling `stop()`, which then threw an exception.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2014-07-11 14:53:46 -07:00
Ryan Brainard 44a91e6ba8 Resolve environment without values to values on host
For parity with the Docker CLI, allow environment variables without
values to be automatically resolved to their values on the host.

Signed-off-by: Ryan Brainard <brainard@heroku.com>

Conflicts:
	tests/integration/service_test.py
2014-07-11 10:18:05 -07:00
Sam Hanes 699bbe9ca2 Split the domainname out of qualified hostnames.
Docker doesn't like it when a fully qualified hostname is passed in
the `hostname` parameter. When an FQDN is provided with `-h` the
official CLI puts the first component in `hostname` and the rest in
`domainname`. This change replicates that behavior when the user
specifies an FQDN in `hostname` in their `fig.yml`.

Signed-off-by: Sam Hanes <sam@maltera.com>
2014-07-10 20:18:09 -07:00
Sam Hanes 789e1ba82b Add domainname to allowed container config.
Signed-off-by: Sam Hanes <sam@maltera.com>
2014-07-10 15:56:26 -07:00
Alexey Lebedeff d83bdd5164 Change working dir through fig.yml
Closes #144

Signed-off-by: Alexey Lebedeff <binarin@gmail.com>
2014-07-10 21:22:45 +04:00
Aanand Prasad d04b1724ec Merge pull request #236 from rail44/feature-support-volumes-from
Support volumes_from option
2014-07-02 10:48:11 +01:00
Satoshi Amemiya e5916b2fae Support volumes_from option
Signed-off-by: Satoshi Amemiya <rail.sky@gmail.com>
2014-07-02 13:27:54 +09:00
Mark Steve Samson 4f7cbc3812 Support for host address in port bindings (Closes #267) 2014-06-27 15:07:22 +01:00
Aanand Prasad 256dccc554 Merge pull request #268 from orchardup/update-docker-py-0.3.2
Update to docker-py 0.3.2
2014-06-25 14:16:48 +01:00
Ben Firshman d0f65906ed Update to docker-py 0.3.2
From 59ced5700c

Now only supports Docker 1.0.0 / remote API v1.12.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2014-06-25 11:56:20 +01:00
Ben Firshman 95aa61cfe5 Merge pull request #246 from d11wtq/feature/auto_start
Feature: `fig up` and `fig run` now start linked containers (closes #31).
2014-06-24 14:46:47 +01:00
Chris Corbyn 247691ca44 Remove auto_start option from fig.yml.
This option is redundant now that services can be started along with links.

Signed-off-by: Chris Corbyn <chris@w3style.co.uk>
2014-06-21 10:39:36 +00:00
Ben Firshman eb69225444 Merge pull request #209 from orchardup/better-invalid-service-name-error
Better error message when service names are invalid
2014-06-20 12:32:07 +01:00
Aanand Prasad cafe68a92d Better error message when service names are invalid 2014-06-20 12:10:18 +01:00
j0hnsmith 6b8044e92c add net param support
Signed-off-by: Peter Flood <info@whywouldwe.com>
2014-06-19 11:57:55 +01:00
Aanand Prasad cfcabce593 Extract stream_output to module 2014-06-18 14:51:12 +01:00
d11wtq ab1fbc96c3 Move keep_old check up into Project
Signed-off-by: Chris Corbyn <chris@w3style.co.uk>
2014-06-09 01:31:50 +00:00
d11wtq 3d8ce448b8 Spike: Re-use existing containers for `fig run`
Signed-off-by: Chris Corbyn <chris@w3style.co.uk>
2014-06-09 01:31:47 +00:00
d11wtq 6bfe5e049d Spike: Implement --no-links for `fig up`
Signed-off-by: Chris Corbyn <chris@w3style.co.uk>
2014-06-09 01:31:46 +00:00
d11wtq 0c12db06ec Move 'auto_start' option default to Service and add unit tests
Signed-off-by: Chris Corbyn <chris@w3style.co.uk>
2014-06-09 01:31:44 +00:00
d11wtq 8b4ed0c1a8 Spike: Add 'auto_start' option to fig.yml
Signed-off-by: Chris Corbyn <chris@w3style.co.uk>
2014-06-09 01:31:27 +00:00
Ben Firshman 7a9228ad75 Remove intermediate build containers
Docker does this by default now.
2014-05-08 15:40:53 +01:00
Aanand Prasad 3abce4259f Fix regression in handling of build errors 2014-04-30 11:53:23 +01:00
Aanand Prasad 6e932794f7 Fix regression when mounting volumes
Caused by
77fec67c60
2014-04-25 12:28:00 +01:00
Aanand Prasad 9e1dfcfb37 Update docker-py APIError imports 2014-04-23 18:20:33 +01:00
Aanand Prasad 80991f1521 Set "VolumesFrom" when starting containers
This is necessary when working with Docker 0.10.0 and up. Fortunately,
we can set it both when creating and starting, and retain compatibility
with 0.8.x and 0.9.x.

recreate_containers() is now responsible for starting containers, as
well as creating them. This greatly simplifies usage of the Service
class.
2014-04-23 15:46:26 +01:00
Aanand Prasad f8ee52ca2a Fix build output
docker-py now streams us the raw JSON events, so we have to replicate
the Docker client's progress logic.

On the bright side, we now have well-behaved progress bars when pulling
an image during `fig build` (no more ski slopes) and `fig up` (no more
silence).
2014-04-15 10:41:06 +01:00
Shane Jonas d9782b2dd1 fix issue with utf8 encoding in logger stdout 2014-04-11 11:21:20 -07:00
Ben Firshman aecaf665f1 Merge pull request #164 from orchardup/friendlier-build-error
Friendlier build error
2014-03-28 23:05:46 +00:00
sebastianneubauer 352ad7a38c Scaling down removes containers
Squashed version of #162.
Closes #121.
2014-03-26 18:28:10 +00:00
Maurits van Mastrigt 710cd38591 Fix UnicodeEncodeErrors in output of 'build', 'run' and 'up'
Squashed version of #125.
Closes #112.
2014-03-25 13:32:03 +00:00
Aanand Prasad 168b1909ae Friendlier build error
Hide the backtrace and show a comprehensible message.

Closes #160.
2014-03-25 12:20:05 +00:00
Kevin van Zonneveld 0f5a56b3c2 Add support for privileged containers #123
This is required for mounting external volumes and
addresses errors such as `mount.nfs: Operation not permitted`

Be gentle, I don't normally use Python :)
2014-03-13 14:31:05 +01:00
Aanand Prasad 13c7380113 Only `fig run` containers link back to the service they're part of
Fixes #107.
2014-03-06 18:59:24 +00:00
Aanand Prasad 2d98071e55 Support 'expose' config option, like docker's --expose
Exposes ports to linked services without publishing them to the world.
2014-03-04 18:06:52 +00:00
Aanand Prasad a00ec9d1f8 Fix: image-defined entrypoint not overridden by intermediate container
This was causing recreation to hang.
2014-03-03 18:06:06 +00:00
Mark Steve Samson c709251f21 Add custom link names (Closes #72) 2014-03-02 00:17:19 +08:00
Ben Firshman b9c8e3e057 Fix scale not binding ports 2014-02-17 21:33:05 +00:00
Aanand Prasad edf8f14ac0 Throw an error if you specify an unrecognised option in `fig.yml`
Closes #27.
2014-02-04 17:46:04 -08:00