plasmabio / tljh-repo2docker

Plugin for The Littlest JupyterHub to build multiple user environments with repo2docker
BSD 3-Clause "New" or "Revised" License
60 stars 15 forks source link

Document creating environments with raw Dockerfiles #44

Closed jtpio closed 2 years ago

jtpio commented 3 years ago

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: https://github.com/plasmabio/tljh-repo2docker/blob/07b16595960700b05bdb1ebb00c0a190164d2f85/tljh_repo2docker/docker.py#L76-L81

However in the case of a Dockerfile, these LABEL are not added automatically. They must be added manually as mentioned in https://github.com/plasmabio/tljh-repo2docker/issues/31#issuecomment-652279271.

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.

jtpio commented 2 years ago

Closing as labels are now handled for Dockerfile with https://github.com/plasmabio/tljh-repo2docker/pull/48