Skip to content

Commit

Permalink
Add 2.4 file format with platform support. Also reads DOCKER_DEFAULT_…
Browse files Browse the repository at this point in the history
…PLATFORM env

Signed-off-by: Joffrey F <[email protected]>
  • Loading branch information
shin- committed Mar 9, 2018
1 parent 62ecf2c commit 92d3a34
Show file tree
Hide file tree
Showing 9 changed files with 611 additions and 8 deletions.
4 changes: 3 additions & 1 deletion compose/cli/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ def get_project(project_dir, config_path=None, project_name=None, verbose=False,
)

with errors.handle_connection_errors(client):
return Project.from_config(project_name, config_data, client)
return Project.from_config(
project_name, config_data, client, environment.get('DOCKER_DEFAULT_PLATFORM')
)


def get_project_name(working_dir, project_name=None, environment=None):
Expand Down
3 changes: 2 additions & 1 deletion compose/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,12 @@
'container_name',
'credential_spec',
'dockerfile',
'init',
'log_driver',
'log_opt',
'logging',
'network_mode',
'init',
'platform',
'scale',
'stop_grace_period',
]
Expand Down
Loading

0 comments on commit 92d3a34

Please sign in to comment.