From d17c4d27fa5259fb8d853ccedc82d28fd199ff8f Mon Sep 17 00:00:00 2001 From: Kyle Walker Date: Fri, 6 Mar 2015 12:33:56 -0800 Subject: [PATCH] Support alternate Dockerfile name. Signed-off-by: Kyle James Walker --- compose/cli/docker_client.py | 2 +- compose/config.py | 1 + compose/service.py | 1 + docs/yml.md | 10 ++++++++++ requirements.txt | 4 ++-- setup.py | 4 ++-- 6 files changed, 17 insertions(+), 5 deletions(-) diff --git a/compose/cli/docker_client.py b/compose/cli/docker_client.py index 20acbdebc..7bbe0ebfa 100644 --- a/compose/cli/docker_client.py +++ b/compose/cli/docker_client.py @@ -32,4 +32,4 @@ def docker_client(): ) timeout = int(os.environ.get('DOCKER_CLIENT_TIMEOUT', 60)) - return Client(base_url=base_url, tls=tls_config, version='1.15', timeout=timeout) + return Client(base_url=base_url, tls=tls_config, version='1.17', timeout=timeout) diff --git a/compose/config.py b/compose/config.py index 2c2ddf633..049c9cb32 100644 --- a/compose/config.py +++ b/compose/config.py @@ -33,6 +33,7 @@ DOCKER_CONFIG_KEYS = [ ALLOWED_KEYS = DOCKER_CONFIG_KEYS + [ 'build', + 'dockerfile', 'expose', 'external_links', 'name', diff --git a/compose/service.py b/compose/service.py index 936e3f9d0..7dbbfe7d0 100644 --- a/compose/service.py +++ b/compose/service.py @@ -474,6 +474,7 @@ class Service(object): stream=True, rm=True, nocache=no_cache, + dockerfile=self.options.get('dockerfile', None), ) try: diff --git a/docs/yml.md b/docs/yml.md index a9909e816..9dc2884ba 100644 --- a/docs/yml.md +++ b/docs/yml.md @@ -39,6 +39,16 @@ Compose will build and tag it with a generated name, and use that image thereaft build: /path/to/build/dir ``` +### dockerfile + +Alternate Dockerfile. + +Compose will use an alternate file to build with. + +``` +dockerfile: Dockerfile-alternate +``` + ### command Override the default command. diff --git a/requirements.txt b/requirements.txt index 4c4113ab9..65f075442 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ PyYAML==3.10 -docker-py==1.0.0 +docker-py==1.1.0 dockerpty==0.3.2 docopt==0.6.1 -requests==2.2.1 +requests==2.6.1 six==1.7.3 texttable==0.8.2 websocket-client==0.11.0 diff --git a/setup.py b/setup.py index 39ac0f6f5..c02a31f4f 100644 --- a/setup.py +++ b/setup.py @@ -27,10 +27,10 @@ def find_version(*file_paths): install_requires = [ 'docopt >= 0.6.1, < 0.7', 'PyYAML >= 3.10, < 4', - 'requests >= 2.2.1, < 2.6', + 'requests >= 2.6.1, < 2.7', 'texttable >= 0.8.1, < 0.9', 'websocket-client >= 0.11.0, < 1.0', - 'docker-py >= 1.0.0, < 1.2', + 'docker-py >= 1.1.0, < 1.2', 'dockerpty >= 0.3.2, < 0.4', 'six >= 1.3.0, < 2', ]