plasmabio / tljh-repo2docker

Plugin for The Littlest JupyterHub to build multiple user environments with repo2docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Document creating environments with raw Dockerfiles

jtpio opened this issue · comments

tljh-repo2docker uses Docker LABEL to tag and list the environments.

They are added using the --appendix CLI option of repo2docker: https://repo2docker.readthedocs.io/en/latest/usage.html#cmdoption-jupyter-repo2docker-appendix

And provided by tljh-repo2docker here:

labels = [
f"LABEL tljh_repo2docker.display_name={name}",
f"LABEL tljh_repo2docker.image_name={image_name}",
f"LABEL tljh_repo2docker.mem_limit={memory}",
f"LABEL tljh_repo2docker.cpu_limit={cpu}",
]

However in the case of a Dockerfile, these LABEL are not added automatically. They must be added manually as mentioned in #31 (comment).

LABEL repo2docker.ref="main"
LABEL repo2docker.repo="https://github.com/foo/bar"
LABEL repo2docker.version="0.11.0+54.gbbc3ee0"
LABEL tljh_repo2docker.mem_limit=""
LABEL tljh_repo2docker.cpu_limit=""
LABEL tljh_repo2docker.display_name="test-env"
LABEL tljh_repo2docker.image_name="test-image"

Ideally this should be documented in the README so it doesn't come too much as a surprised.

Closing as labels are now handled for Dockerfile with #48