Remove constant docker args
MODIFY
repo2docker/app.py
repo2docker/app.py
@@ -576,7 +576,6 @@ class Repo2Docker(Application):
run_kwargs = dict(
publish_all_ports=self.all_ports,
ports=ports,
- detach=True,
command=run_cmd,
volumes=container_volumes,
environment=self.environment,

MODIFY
repo2docker/buildpacks/base.py
repo2docker/buildpacks/base.py
@@ -607,9 +607,6 @@ class BuildPack:
tag=image_spec,
custom_context=True,
buildargs=build_args,
- decode=True,
- forcerm=True,
- rm=True,
container_limits=limits,
cache_from=cache_from,
)

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

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

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

Remove constant docker args