From e32c7b02df9f5e3726dec1a83df2db79d37e838e Mon Sep 17 00:00:00 2001 From: Simon Li Date: Fri, 14 Feb 2020 22:01:08 +0000 Subject: [PATCH] describe ContainerEngine volume and port formats --- repo2docker/engine.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/repo2docker/engine.py b/repo2docker/engine.py index c0d7f6f5..6b9fa117 100644 --- a/repo2docker/engine.py +++ b/repo2docker/engine.py @@ -80,7 +80,8 @@ class Container(ABC): str : The status of the container. Values include `created` `running` `exited`. - TODO: Does Docker have a fixed list of these? + Full list of statuses: + https://github.com/moby/moby/blob/v19.03.5/api/swagger.yaml#L4832 """ @@ -182,12 +183,10 @@ class ContainerEngine(LoggingConfigurable): custom_context : bool If `True` fileobj is a Tar file object containing the build context - TODO: Specific to Docker dockerfile : str Path to Dockerfile within the build context fileobj : tarfile A tar file-like object containing the build context - TODO: Specific to Docker, other clients can untar this to a tempdir path : str path to the Dockerfile @@ -270,15 +269,14 @@ class ContainerEngine(LoggingConfigurable): environment : list[str] List of environment variables in the form `ENVVAR=value` 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? + Container port bindings in the form generated by `repo2docker.utils.validate_and_generate_port_mapping` + https://github.com/jupyter/repo2docker/blob/0.11.0/repo2docker/utils.py#L95 publish_all_ports : bool If `True` publish all ports to host remove : bool If `True` delete container when it completes volumes : dict - Volume bindings in the format expected by the engine - TODO: Should we use a fixed format and convert to whatever's required by the engine? + Volume bindings in the form `{src : dest}` Returns -------