Fix for #1224, check that image or build is specified
Signed-off-by: Michael Chase-Salerno <bratac@linux.vnet.ibm.com>
This commit is contained in:
parent
3cd116b99d
commit
15b763acdb
3 changed files with 30 additions and 14 deletions
|
|
@ -60,6 +60,8 @@ class Service(object):
|
|||
raise ConfigError('Invalid project name "%s" - only %s are allowed' % (project, VALID_NAME_CHARS))
|
||||
if 'image' in options and 'build' in options:
|
||||
raise ConfigError('Service %s has both an image and build path specified. A service can either be built to image or use an existing image, not both.' % name)
|
||||
if 'image' not in options and 'build' not in options:
|
||||
raise ConfigError('Service %s has neither an image nor a build path specified. Exactly one must be provided.' % name)
|
||||
|
||||
self.name = name
|
||||
self.client = client
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue