Commit Graph

1342 Commits

Author SHA1 Message Date
Aanand Prasad e9da790f76 Merge pull request #1660 from mnowster/754-add-option-memswap-limit
Add in memswap_limit run option
2015-07-07 10:09:49 +01:00
Mazz Mosley fc26982132 Add in memswap_limit run option
By allowing the memswap_limit option to be defined we also need to
check that mem_limit is set, you can't have swap without a limit.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-06 17:08:57 +01:00
Daniel Nephin 20218394b9 Merge pull request #1649 from albers/doc-completion-zsh
Mention zsh command completion in general install section
2015-07-06 06:41:09 -07:00
Aanand Prasad fc8f564558 Merge pull request #1632 from mnowster/extends_file_default_behaviour
Extends file default behaviour and fixes circular reference bug
2015-07-06 13:28:54 +01:00
Aanand Prasad 0fa5808389 Merge pull request #1623 from mnowster/documentation-fixes
Documentation fixes
2015-07-06 13:25:56 +01:00
Harald Albers 2fc7cd6e03 Mention zsh command completion in general install section
Signed-off-by: Harald Albers <github@albersweb.de>
2015-07-05 19:18:24 +02:00
Aanand Prasad d90202399a Merge pull request #1645 from dnephin/fix_up_race
Fix race condition in docker-compose up
2015-07-03 16:28:22 +01:00
Aanand Prasad f42fd6a3ad Merge pull request #1642 from aanand/fix-1573
Fix bug where duplicate container is leftover after 'up' fails
2015-07-03 16:25:53 +01:00
Aanand Prasad d85688892c Merge pull request #1644 from aanand/fix-rm-bug
Stop 'rm' and 'ps' listing services not defined in the current file
2015-07-03 16:22:48 +01:00
Daniel Nephin bd554a6fea Fix race condition in docker-compose up.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-07-03 10:29:46 -04:00
Mazz Mosley 317bbec98c Move make_service_dict out of config
This top level function is a test helper, so I've moved it into the
config_test file and updated accordingly.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-03 15:06:53 +01:00
Mazz Mosley 6e6dbdad95 working_dir is no longer optional
When building test data using make_service_dict, we need to include
working_dir as it is core to some of the functionality of
ServiceLoader.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-03 14:56:18 +01:00
Aanand Prasad 0b887b841f Stop 'rm' and 'ps' listing services not defined in the current file
If you have an alternate YAML file with different services defined,
containers for those services will be shown in `docker-compose ps` even
if you don't pass that file in.

Furthermore, `docker-compose rm` will claim that it's going to remove
them, but actually won't.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-03 14:34:27 +01:00
Mazz Mosley c6e03d739d Test self referencing 'file'
When specifying the 'file' key to a value of it's own name, test
that this works and does not cause a false positive circular reference
error.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-03 14:14:47 +01:00
Mazz Mosley 6a6e7934bd Refactor circular-reference check
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-03 14:05:35 +01:00
Mazz Mosley ba71e2a549 Use new load_from_filename
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-03 14:05:14 +01:00
Mazz Mosley c51d53afba Fix off by one error
In our circular reference check the stack was previously off by one,
by not including the current service name that was calling another.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-03 12:24:33 +01:00
Mazz Mosley bd7fcd1123 Use absolute paths
A circular reference bug occurs when there is a difference in the paths
of the file specified in the extends. So one time it is relative, second
time is absolute thus allowing a further circular reference to occur.

By using absolute paths we can be sure that the service filename check
is correct.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-03 12:21:12 +01:00
Mazz Mosley 254bc4908c Move extends validation into ServiceLoader class
This refactoring allows us to raise an error when there is no
'file' key specified in the .yml and no self.filename set. This
error was specific to the tests, as the tests are
the only place that constructs service dicts without sometimes
setting a filename.

Moving the function within the class as well as it is code that
is exclusively for the use of validating properties for the
ServiceLoader class.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-03 11:26:31 +01:00
Mazz Mosley 24c1d95869 Refactor extends validation tests
Split them out into individual validation tests so it is clearer
to see what is going on and to enable adding further validation
tests.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-03 11:26:31 +01:00
Mazz Mosley 5e2d43843c Reduce path manipulation
If we're using self.filename, then it's already a full path and we
don't need to splice off the filename.yml just so we can .join it
back together again.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-03 11:26:31 +01:00
Mazz Mosley 6e4a954dbd 'file' key can be omitted from extends
If the 'file' key is not set in the extends_options dict then we
look for the 'service' from within the same file.

Fixes this issue: https://github.com/docker/compose/issues/1237

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-03 11:26:30 +01:00
Mazz Mosley 31dedd8bdd Rename function process to validate
The process function contained purely validation checks, so re-named
the function to aid intent clarity.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-03 11:26:30 +01:00
Aanand Prasad 62b47224f0 Fix bug where duplicate container is leftover after 'up' fails
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-03 10:46:07 +01:00
Aanand Prasad db7e5124f3 Merge pull request #1488 from dnephin/config_from_stdin
Support reading config from stdin
2015-07-03 09:03:40 +01:00
Aanand Prasad a6b9982a1e Merge pull request #1633 from jeffk/parse_env_vars_in_all_volumes
Added env var parsing to volume container paths
2015-07-03 08:55:48 +01:00
Aanand Prasad 40b8c3c892 Merge pull request #1624 from mnowster/1519_relax_service_name_restrictions
1519 relax service name restrictions
2015-07-03 08:54:16 +01:00
Daniel Nephin ae96fc0071 Support reading config from stdin.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-07-02 22:16:22 -04:00
Jeff Kramer 8709dc3c24 Added env var parsing to volume container paths
This commit adds environment variable parsing to the container side
of the volume mapping in configs. The common use case for this is
mounting SSH agent sockets in a container, using code like:

volumes:
    - $SSH_AUTH_SOCK:$SSH_AUTH_SOCK
environment:
    - SSH_AUTH_SOCK

Signed-off-by: Jeff Kramer <jeff.kramer@voxmedia.com>
2015-07-02 13:13:38 -05:00
Mazz Mosley a8ea82f78f Improve link caption
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-02 15:39:22 +01:00
Mazz Mosley cd2cdb25e3 Merge pull request #1631 from aanand/add-mazz-to-maintainers
Add Mazz to MAINTAINERS
2015-07-02 14:20:39 +01:00
moxiegirl 5185c9f70a Merge pull request #1619 from AndyWendt/patch-1
Added uninstall documentation for pip and curl
2015-07-02 06:07:59 -07:00
Mazz Mosley f0dd63d5bc Don't use future tense
As per style-guide, future tense is not necessary.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-01 18:06:09 +01:00
Mazz Mosley 9549bd0539 Initial cap Docker
Use lowercase docker only when referencing a command/daemon

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-01 18:05:21 +01:00
Mazz Mosley f33f673b49 Allow _.- chars in service names
As VALID_CHARS is shared with project names, these chars are also
now allowed within project names.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-01 17:57:50 +01:00
Mazz Mosley 8cf84ea552 Fix missing image names
These tests were indeed raising a config error, but not for the reason
intended/tested for. I've added in the image name so the config error
raise is correctly testing the Service name.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-01 17:57:50 +01:00
Mazz Mosley 8a47791161 Re-arrange for the more common case
boot2docker is the more common case so let's have that one first.
Also be more explicit and clear that the localhost:5000 is applicable
for people running on linux.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-01 16:20:29 +01:00
Mazz Mosley ab03f2310b Include zsh shell
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-01 16:20:29 +01:00
Mazz Mosley 94ecc515d3 Link to docker's contrib workflow
This will aid people in how to make pull requests for code and docs.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-01 16:20:29 +01:00
Mazz Mosley 098ec3dcaa Add in `git fork` syncing links
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-01 15:58:11 +01:00
Mazz Mosley 4e0f4aa20a Split out release process
To aid clarity in how to contribute, I've moved the release process
out into it's own RELEASE_PROCESS.md file. The release process info
is only relevant for maintainers who are building new releases of
compose.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-01 15:58:11 +01:00
Mazz Mosley c45c16cead Improve localhost & boot2docker info
Added a link to boot2docker for those unfamiliar with it.

http://0.0.0.0:5000 didn't resolve for me, however localhost:5000
did, so included reference to that.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-01 15:58:11 +01:00
Mazz Mosley d0c499329e Add a note not to worry
When reading through the code for the first time and seeing redis,
those unfamiliar with docker first thought might be that they need
to install redis. Adding this sentence helps make it clearer that
this is not needed. Docker will take care of this in services.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-01 15:58:10 +01:00
Mazz Mosley 4c31741ac9 Include command completion link
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-01 15:58:10 +01:00
Mazz Mosley a7a0888446 Re-phrasing for clarity
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-01 15:58:10 +01:00
Mazz Mosley 4d69a57edd Include flask output
When running `docker-compose up`, an extra line of output, from flask,
is outputted. I've included it so anyone new to docker-compose who
sees this output will know that it's expected and not worry that
something might have gone wrong.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-01 15:58:10 +01:00
Mazz Mosley 3906bd067e Remove redundant import
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-01 15:58:10 +01:00
Aanand Prasad 63941b8f6c Add Mazz to MAINTAINERS
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-01 15:38:07 +01:00
Aanand Prasad 75600e37ad Merge pull request #1605 from sdurrheimer/zsh-help-completion
Add --help to subcommands in zsh completion
2015-07-01 12:36:25 +01:00
Andy Wendt 8197d0e261 Added uninstall documentation for pip and curl
Signed-off-by: Andy Wendt <andy@awendt.com>
2015-06-30 10:27:44 -06:00