Do not allow underscores in names
This commit is contained in:
parent
9f1d08c54b
commit
6c551a200b
2 changed files with 6 additions and 6 deletions
|
|
@ -13,7 +13,7 @@ class BuildError(Exception):
|
|||
|
||||
class Service(object):
|
||||
def __init__(self, name, client=None, links=[], **options):
|
||||
if not re.match('^[a-zA-Z0-9_]+$', name):
|
||||
if not re.match('^[a-zA-Z0-9]+$', name):
|
||||
raise ValueError('Invalid name: %s' % name)
|
||||
if 'image' in options and 'build' in options:
|
||||
raise ValueError('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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue