# Podman(1) not working inside JupyterLab containers that are launched by JupyterHub

**URL:** <https://discourse.jupyter.org/t/podman-1-not-working-inside-jupyterlab-containers-that-are-launched-by-jupyterhub/7188>\
**Category:** General\
**Tags:** community, jupyterhub, how-to, help-wanted\
**Created:** [December 17, 2020, 1:20am UTC](https://discourse.jupyter.org/t/podman-1-not-working-inside-jupyterlab-containers-that-are-launched-by-jupyterhub/7188 "2020-12-17T01:20:15Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![nmvega](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/nmvega/32/1960_2.png) [@nmvega](https://discourse.jupyter.org/u/nmvega)\
**Post date:** [December 18, 2020, 11:37pm UTC](https://discourse.jupyter.org/t/podman-1-not-working-inside-jupyterlab-containers-that-are-launched-by-jupyterhub/7188/7 "2020-12-18T23:37:36Z")

</div>

**UPDATE2** :

Okay, the following appears to be a material difference in the `docker inspect jupyter-janedoe` (`JSON`) output between both cases, which may be contributing to this issue:

`docker inspect jupyter-janedoe` (launched via **CLI** ):

```auto
"HostConfig": {
    "Binds": [
          "/sys/fs/cgroup:/sys/fs/cgroup:ro"
 ],

```

`docker inspect jupyter-janedoe` (launched via **DockerSpawner** ):

```auto
"HostConfig": {
    "Binds": [
          "jupyterhub-user-janedoe:/home/jovyan:rw"
 ],

```

The **DockerSpawner** entry should be a `union` of both entries (as shown below), but it’s missing the second item:

```auto
"HostConfig": {
    "Binds": [
          "jupyterhub-user-janedoe:/home/jovyan:rw",
          "/sys/fs/cgroup:/sys/fs/cgroup:ro"
 ],

```

This means the code-snippet in my **UPDATE1** is incorrect.

So far I’ve verified that updating the `c.DockerSpawner.volumes.update` attribute is incorrect, because it led to the following at runtime, which isn’t needed (_and maybe even ambiguous with respect to what it even means_ LoL 😊):

```auto
# We want a Volume entry, not Device entry.
"Devices": [{
    "PathOnHost": "/sys/fs/cgroup",
    "PathInContainer": "/sys/fs/cgroup",
    "CgroupPermissions": "ro"
}]

```

So reverse-engineering a little bit, according to the **CLI** working case, we want the following `/sys/fs/cgroup` entries; but only the `"Volumes":` (middle) entry appears in the **DockerSpawner** failure case (the outer two entries are missing):

```auto
[... snip ...]

"Mounts": [{
   "Type": "bind",
   "Source": "/sys/fs/cgroup",
   "Destination": "/sys/fs/cgroup",
   "Mode": "ro",
   "RW": false,
   "Propagation": "rprivate" }]

[... snip ...]

"Volumes": {
   "/sys/fs/cgroup": {}
}

[... snip ...]

"HostConfig": {
   "Binds": [
     "/sys/fs/cgroup:/sys/fs/cgroup:ro"
],

```

To achieve this, I’m trying to figure out what the correct `attribute(s)` is/are to modify, as well as the correct syntax.

In summary, I need a `Mounts:` entry for `/sys/fs/cgroup`; as well as to append `/sys/fs/cgroup` entry to the `HostConfig` list.

---

_[View the full topic](https://discourse.jupyter.org/t/podman-1-not-working-inside-jupyterlab-containers-that-are-launched-by-jupyterhub/7188)._
