Hi,
When snap installing docker (or microk8s) and you “docker run” something the LD_LIBRARY_PATH is not set in the spawned container. In the following example MY_VAR is set but LD_LIBRARY_PATH not:
ubuntu@ip-172-31-52-95:~$ sudo docker run -e "LD_LIBRARY_PATH=foo" -e "MY_VAR=is_set" jupyterhub/jupyterhub:0.8.1 env
PATH=/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=3ecen9ffc0c7d
MY_VAR=is_set
DEBIAN_FRONTEND=noninteractive
LANG=C.UTF-8
HOME=/root
The result is not being able to start some containers:
ubuntu@ip-172-31-52-95:~$ sudo docker run jupyterhub/jupyterhub:0.8.1
/opt/conda/bin/python: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
This behavior is similar to what setuid is doing when ignoring LD_LIBRARY_PATH for security reasons. I am not sure how this fits into the bigger picture.
What is the right way to tackle this? Can this behavior be configured in the snap?
The issue was first reported here: https://github.com/docker/docker-snap/issues/30 and its effect on running kubeflow on microk8s is tracked here: https://github.com/kubeflow/kubeflow/issues/1367
Thank you