# Docker Dicom Listener issue

**URL:** <https://discourse.slicer.org/t/docker-dicom-listener-issue/25283>\
**Category:** Support\
**Tags:** dicom, docker\
**Created:** [September 15, 2022, 7:38pm UTC](https://discourse.slicer.org/t/docker-dicom-listener-issue/25283 "2022-09-15T19:38:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dSC](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dsc/32/8943_2.png) [@dSC](https://discourse.slicer.org/u/dSC)\
**Post date:** [September 15, 2022, 7:38pm UTC](https://discourse.slicer.org/t/docker-dicom-listener-issue/25283/1 "2022-09-15T19:38:58Z")

</div>

Hello Guys,  
I’m trying to start storage listener in Slicer in the web (docker version)

this is the error.

Problem trying to start DICOM listener:  
[Errno 2] No such file or directory: ‘ps’

Any suggestion?

Best  
Daniele

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [September 15, 2022, 8:48pm UTC](https://discourse.slicer.org/t/docker-dicom-listener-issue/25283/2 "2022-09-15T20:48:55Z")

</div>

`ps` is the built in process list on linux that is used to tell if the listener is already running. It should be available in the docker os layer. You can investigate why it’s not available in your image or you can report back with more details about what image you are using and how you start it.

---

<div class="post-metadata">

**Author:** ![dSC](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dsc/32/8943_2.png) [@dSC](https://discourse.slicer.org/u/dSC)\
**Post date:** [September 15, 2022, 8:53pm UTC](https://discourse.slicer.org/t/docker-dicom-listener-issue/25283/3 "2022-09-15T20:53:19Z")

</div>

Thanks Steve for your reply.

I’m following repo instruction then:

```
docker run -p 8888:8888 -p 49053:49053 -v "$PWD":/home/sliceruser/work --rm -ti lassoan/slicer-notebook:latest

```

and this in jupyter

```python
import JupyterNotebooksLib as slicernb
import slicer
import ipywidgets
ipywidgets.HTML(f'<h1><center><a href="{slicernb.AppWindow.defaultDesktopUrl()}" target="_blank"><img src="https://www.slicer.org/assets/img/3D-Slicer-Mark.svg" width="100" height="100"/><br>Click here to open 3D Slicer in a new window</a></center></h1>')

```

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [September 15, 2022, 9:13pm UTC](https://discourse.slicer.org/t/docker-dicom-listener-issue/25283/4 "2022-09-15T21:13:00Z")

</div>

Ah, yes, the jupyter server may not be running on a normal OS and may not be able to run the dicom listener.

This is where it tries to run `ps`. Maybe you need to find a different way to run external processes.

> <https://github.com/Slicer/Slicer/blob/23744ee0e374928b76dc4c1209faa07377bee518/Modules/Scripted/DICOMLib/DICOMProcesses.py#L192-L200>

If you do get the listener running you will also need to map port 11112 if you want to communicate with it from your host machine.

---

<div class="post-metadata">

**Author:** ![dSC](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dsc/32/8943_2.png) [@dSC](https://discourse.slicer.org/u/dSC)\
**Post date:** [September 15, 2022, 9:44pm UTC](https://discourse.slicer.org/t/docker-dicom-listener-issue/25283/5 "2022-09-15T21:44:25Z")

</div>

Understood, thank you.

Do you have any web based alternative able to avoid this jupyter server issues?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [September 16, 2022, 2:34pm UTC](https://discourse.slicer.org/t/docker-dicom-listener-issue/25283/6 "2022-09-16T14:34:27Z")

</div>

The slicer-notebook is built on a regular linux as far as I can see. I’m not sure why `ps` won’t run, maybe there’s some permission lockdown.

> <https://github.com/Slicer/SlicerDocker/blob/main/slicer-notebook/Dockerfile>

I have some other docker images that might work differently.

> **[GitHub - pieper/SlicerDockers: docker config files for slicer](https://github.com/pieper/SlicerDockers)**
>
> docker config files for slicer. Contribute to pieper/SlicerDockers development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 16, 2022, 6:21pm UTC](https://discourse.slicer.org/t/docker-dicom-listener-issue/25283/7 "2022-09-16T18:21:05Z")

</div>

The slice-notebook image uses a minimal linux installation. To get `ps`, we need to add `sudo apt-get install procps` to the dockerfile. I’ve done this for 5.0.2, 5.0.3, and latest tags, and it seems to work well, the DICOM listener does complain.

---

<div class="post-metadata">

**Author:** ![dSC](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dsc/32/8943_2.png) [@dSC](https://discourse.slicer.org/u/dSC)\
**Post date:** [September 17, 2022, 3:27pm UTC](https://discourse.slicer.org/t/docker-dicom-listener-issue/25283/8 "2022-09-17T15:27:26Z")

</div>

This is great!  
Thanks a ton!
