outposts: fix container not being started after creation
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
bd92505bc2
commit
4917ab9985
|
@ -79,7 +79,7 @@ class DockerController(BaseController):
|
||||||
try:
|
try:
|
||||||
return self.client.containers.get(container_name), False
|
return self.client.containers.get(container_name), False
|
||||||
except NotFound:
|
except NotFound:
|
||||||
self.logger.info("Container does not exist, creating")
|
self.logger.info("(Re-)creating container...")
|
||||||
image_name = self.get_container_image()
|
image_name = self.get_container_image()
|
||||||
self.client.images.pull(image_name)
|
self.client.images.pull(image_name)
|
||||||
container_args = {
|
container_args = {
|
||||||
|
@ -107,6 +107,7 @@ class DockerController(BaseController):
|
||||||
try:
|
try:
|
||||||
container, has_been_created = self._get_container()
|
container, has_been_created = self._get_container()
|
||||||
if has_been_created:
|
if has_been_created:
|
||||||
|
container.start()
|
||||||
return None
|
return None
|
||||||
# Check if the container is out of date, delete it and retry
|
# Check if the container is out of date, delete it and retry
|
||||||
if len(container.image.tags) > 0:
|
if len(container.image.tags) > 0:
|
||||||
|
|
Reference in New Issue