Преглед на файлове

Merge pull request #1075 from KyleJamesWalker/master

Support alternate Dockerfile name.
Daniel Nephin преди 10 години
родител
ревизия
a89bc304f6
променени са 6 файла, в които са добавени 17 реда и са изтрити 5 реда
  1. 1 1
      compose/cli/docker_client.py
  2. 1 0
      compose/config.py
  3. 1 0
      compose/service.py
  4. 10 0
      docs/yml.md
  5. 2 2
      requirements.txt
  6. 2 2
      setup.py

+ 1 - 1
compose/cli/docker_client.py

@@ -32,4 +32,4 @@ def docker_client():
         )
         )
 
 
     timeout = int(os.environ.get('DOCKER_CLIENT_TIMEOUT', 60))
     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)

+ 1 - 0
compose/config.py

@@ -35,6 +35,7 @@ DOCKER_CONFIG_KEYS = [
 
 
 ALLOWED_KEYS = DOCKER_CONFIG_KEYS + [
 ALLOWED_KEYS = DOCKER_CONFIG_KEYS + [
     'build',
     'build',
+    'dockerfile',
     'expose',
     'expose',
     'external_links',
     'external_links',
     'name',
     'name',

+ 1 - 0
compose/service.py

@@ -482,6 +482,7 @@ class Service(object):
             stream=True,
             stream=True,
             rm=True,
             rm=True,
             nocache=no_cache,
             nocache=no_cache,
+            dockerfile=self.options.get('dockerfile', None),
         )
         )
 
 
         try:
         try:

+ 10 - 0
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
 build: /path/to/build/dir
 ```
 ```
 
 
+### dockerfile
+
+Alternate Dockerfile.
+
+Compose will use an alternate file to build with.
+
+```
+dockerfile: Dockerfile-alternate
+```
+
 ### command
 ### command
 
 
 Override the default command.
 Override the default command.

+ 2 - 2
requirements.txt

@@ -1,8 +1,8 @@
 PyYAML==3.10
 PyYAML==3.10
-docker-py==1.0.0
+docker-py==1.1.0
 dockerpty==0.3.2
 dockerpty==0.3.2
 docopt==0.6.1
 docopt==0.6.1
-requests==2.2.1
+requests==2.6.1
 six==1.7.3
 six==1.7.3
 texttable==0.8.2
 texttable==0.8.2
 websocket-client==0.11.0
 websocket-client==0.11.0

+ 2 - 2
setup.py

@@ -27,10 +27,10 @@ def find_version(*file_paths):
 install_requires = [
 install_requires = [
     'docopt >= 0.6.1, < 0.7',
     'docopt >= 0.6.1, < 0.7',
     'PyYAML >= 3.10, < 4',
     'PyYAML >= 3.10, < 4',
-    'requests >= 2.2.1, < 2.6',
+    'requests >= 2.6.1, < 2.7',
     'texttable >= 0.8.1, < 0.9',
     'texttable >= 0.8.1, < 0.9',
     'websocket-client >= 0.11.0, < 1.0',
     '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',
     'dockerpty >= 0.3.2, < 0.4',
     'six >= 1.3.0, < 2',
     'six >= 1.3.0, < 2',
 ]
 ]