feat: implement infeasible service initialization
This commit is contained in:
parent
83db62937c
commit
86853f4a3e
1 changed files with 3 additions and 0 deletions
|
@ -10,6 +10,9 @@ class Service:
|
||||||
if image is None and extends is None:
|
if image is None and extends is None:
|
||||||
raise ValueError(f"Both image and extends are not defined in service '{name}', aborting.")
|
raise ValueError(f"Both image and extends are not defined in service '{name}', aborting.")
|
||||||
|
|
||||||
|
if image is not None and extends is not None:
|
||||||
|
raise ValueError(f"Only one of image and extends can be defined in service '{name}', aborting.")
|
||||||
|
|
||||||
self._image = image
|
self._image = image
|
||||||
self._ports = ports
|
self._ports = ports
|
||||||
self._networks = networks
|
self._networks = networks
|
||||||
|
|
Loading…
Reference in a new issue