Remove constant docker args

pull/848/head
Simon Li 2020-02-11 21:05:10 +00:00 zatwierdzone przez Simon Li
rodzic 9ac8a8314c
commit c521c3c950
5 zmienionych plików z 25 dodań i 28 usunięć

Wyświetl plik

@ -576,7 +576,6 @@ class Repo2Docker(Application):
run_kwargs = dict( run_kwargs = dict(
publish_all_ports=self.all_ports, publish_all_ports=self.all_ports,
ports=ports, ports=ports,
detach=True,
command=run_cmd, command=run_cmd,
volumes=container_volumes, volumes=container_volumes,
environment=self.environment, environment=self.environment,

Wyświetl plik

@ -607,9 +607,6 @@ class BuildPack:
tag=image_spec, tag=image_spec,
custom_context=True, custom_context=True,
buildargs=build_args, buildargs=build_args,
decode=True,
forcerm=True,
rm=True,
container_limits=limits, container_limits=limits,
cache_from=cache_from, cache_from=cache_from,
) )

Wyświetl plik

@ -50,9 +50,6 @@ class DockerBuildPack(BuildPack):
dockerfile=self.binder_path(self.dockerfile), dockerfile=self.binder_path(self.dockerfile),
tag=image_spec, tag=image_spec,
buildargs=build_args, buildargs=build_args,
decode=True,
forcerm=True,
rm=True,
container_limits=limits, container_limits=limits,
cache_from=cache_from, cache_from=cache_from,
) )

Wyświetl plik

@ -54,11 +54,11 @@ class DockerEngine(ContainerEngine):
buildargs=None, buildargs=None,
cache_from=None, cache_from=None,
container_limits=None, container_limits=None,
forcerm=False, # forcerm=False,
rm=False, # rm=False,
tag="", tag="",
custom_context=False, custom_context=False,
decode=False, # decode=False,
dockerfile="", dockerfile="",
fileobj=None, fileobj=None,
path="", path="",
@ -67,11 +67,11 @@ class DockerEngine(ContainerEngine):
buildargs=buildargs, buildargs=buildargs,
cache_from=cache_from, cache_from=cache_from,
container_limits=container_limits, container_limits=container_limits,
forcerm=forcerm, forcerm=True,
rm=rm, rm=True,
tag=tag, tag=tag,
custom_context=custom_context, custom_context=custom_context,
decode=decode, decode=True,
dockerfile=dockerfile, dockerfile=dockerfile,
fileobj=fileobj, fileobj=fileobj,
path=path, path=path,
@ -92,7 +92,7 @@ class DockerEngine(ContainerEngine):
*, *,
command=None, command=None,
environment=None, environment=None,
detach=False, # detach=False,
ports=None, ports=None,
publish_all_ports=False, publish_all_ports=False,
remove=False, remove=False,
@ -102,7 +102,7 @@ class DockerEngine(ContainerEngine):
image_spec, image_spec,
command=command, command=command,
environment=(environment or []), environment=(environment or []),
detach=detach, detach=True,
ports=(ports or {}), ports=(ports or {}),
publish_all_ports=publish_all_ports, publish_all_ports=publish_all_ports,
remove=remove, remove=remove,

Wyświetl plik

@ -100,11 +100,11 @@ class ContainerEngine(ABC):
buildargs={}, buildargs={},
cache_from=[], cache_from=[],
container_limits={}, container_limits={},
forcerm=False, # forcerm=False,
rm=False, # rm=False,
tag="", tag="",
custom_context=False, custom_context=False,
decode=False, # decode=False,
dockerfile="", dockerfile="",
fileobj=None, fileobj=None,
path="", path="",
@ -124,19 +124,22 @@ class ContainerEngine(ABC):
- `cpushares` - `cpushares`
- `memory` - `memory`
- `memswap` - `memswap`
forcerm : bool # forcerm : bool
Always remove containers including unsuccessful builds # Always remove containers including unsuccessful builds
rm : bool # always True
Remove intermediate containers # rm : bool
# Remove intermediate containers
# always True
tag : str tag : str
Tag to add to the image Tag to add to the image
custom_context : bool custom_context : bool
If `True` fileobj is a Tar file object containing the build context If `True` fileobj is a Tar file object containing the build context
TODO: Specific to Docker TODO: Specific to Docker
decode : bool # decode : bool
If `True` decode responses into dicts # If `True` decode responses into dicts
TODO: repo2docker sets this to True but it's not clear what other clients should return # TODO: repo2docker sets this to True but it's not clear what other clients should return
# always True
dockerfile : str dockerfile : str
Path to Dockerfile within the build context Path to Dockerfile within the build context
fileobj : tarfile fileobj : tarfile
@ -192,7 +195,7 @@ class ContainerEngine(ABC):
*, *,
command=[], command=[],
environment=[], environment=[],
detach=False, # detach=False,
ports={}, ports={},
publish_all_ports=False, publish_all_ports=False,
remove=False, remove=False,
@ -209,8 +212,9 @@ class ContainerEngine(ABC):
The command to run The command to run
environment : list[str] environment : list[str]
List of environment variables in the form `ENVVAR=value` List of environment variables in the form `ENVVAR=value`
detach : bool # detach : bool
If `True` run container in background # If `True` run container in background
# always True
ports : dict ports : dict
Container port bindings in the format expected by the engine Container port bindings in the format expected by the engine
TODO: Should we use a fixed format and convert to whatever's required by the engine? TODO: Should we use a fixed format and convert to whatever's required by the engine?