kopia lustrzana https://github.com/jupyterhub/repo2docker
Container .build .run need to support **kwargs
rodzic
ad5701dd3a
commit
4647dd0702
|
@ -61,7 +61,8 @@ class DockerEngine(ContainerEngine):
|
||||||
custom_context=False,
|
custom_context=False,
|
||||||
dockerfile="",
|
dockerfile="",
|
||||||
fileobj=None,
|
fileobj=None,
|
||||||
path=""
|
path="",
|
||||||
|
**kwargs,
|
||||||
):
|
):
|
||||||
return self._apiclient.build(
|
return self._apiclient.build(
|
||||||
buildargs=buildargs,
|
buildargs=buildargs,
|
||||||
|
@ -75,6 +76,7 @@ class DockerEngine(ContainerEngine):
|
||||||
dockerfile=dockerfile,
|
dockerfile=dockerfile,
|
||||||
fileobj=fileobj,
|
fileobj=fileobj,
|
||||||
path=path,
|
path=path,
|
||||||
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
def images(self):
|
def images(self):
|
||||||
|
@ -96,7 +98,8 @@ class DockerEngine(ContainerEngine):
|
||||||
ports=None,
|
ports=None,
|
||||||
publish_all_ports=False,
|
publish_all_ports=False,
|
||||||
remove=False,
|
remove=False,
|
||||||
volumes=None
|
volumes=None,
|
||||||
|
**kwargs,
|
||||||
):
|
):
|
||||||
container = self._client.containers.run(
|
container = self._client.containers.run(
|
||||||
image_spec,
|
image_spec,
|
||||||
|
@ -107,5 +110,6 @@ class DockerEngine(ContainerEngine):
|
||||||
publish_all_ports=publish_all_ports,
|
publish_all_ports=publish_all_ports,
|
||||||
remove=remove,
|
remove=remove,
|
||||||
volumes=(volumes or {}),
|
volumes=(volumes or {}),
|
||||||
|
**kwargs,
|
||||||
)
|
)
|
||||||
return DockerContainer(container)
|
return DockerContainer(container)
|
||||||
|
|
|
@ -147,7 +147,8 @@ class ContainerEngine(LoggingConfigurable):
|
||||||
custom_context=False,
|
custom_context=False,
|
||||||
dockerfile="",
|
dockerfile="",
|
||||||
fileobj=None,
|
fileobj=None,
|
||||||
path=""
|
path="",
|
||||||
|
**kwargs
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Build a container
|
Build a container
|
||||||
|
@ -242,7 +243,8 @@ class ContainerEngine(LoggingConfigurable):
|
||||||
ports={},
|
ports={},
|
||||||
publish_all_ports=False,
|
publish_all_ports=False,
|
||||||
remove=False,
|
remove=False,
|
||||||
volumes={}
|
volumes={},
|
||||||
|
**kwargs
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Run a container
|
Run a container
|
||||||
|
|
Ładowanie…
Reference in New Issue