I built the Docker-Image on a Raspberry Pi zero and had Problems with connecting the KISS-Modem on /dev/ttyACM0
My Solution:
i added usermod -a -G dialout $USER to the dockerfile:
# Create the group and user in order to run without root privileges
RUN groupadd --gid "$PGID" "$GROUP" \
&& useradd --uid "$PUID" --gid "$PGID" --home-dir "$HOME_DIR" --create-home --shell /usr/bin/bash "$USER" \
&& usermod -a -G dialout $USER
Hi, I hope i'm doing this right...
I built the Docker-Image on a Raspberry Pi zero and had Problems with connecting the KISS-Modem on /dev/ttyACM0
My Solution:
i added `usermod -a -G dialout $USER` to the dockerfile:
```
# Create the group and user in order to run without root privileges
RUN groupadd --gid "$PGID" "$GROUP" \
&& useradd --uid "$PUID" --gid "$PGID" --home-dir "$HOME_DIR" --create-home --shell /usr/bin/bash "$USER" \
&& usermod -a -G dialout $USER
```
<!-- github-sync-id:4609337143 -->
Without docker built on native Raspberry OS the KISS-TNC is recognized but does not RXing or TXing, maybe same issue?
Without docker built on native Raspberry OS the KISS-TNC is recognized but does not RXing or TXing, maybe same issue?
<!-- github-comment-id:4656023757 -->
@UnImAtrIXzEr0 and @StreetPiet can either of you test the new pymcdev docker image?
```yaml
tags:
- pymcdev/pymc-repeater:dev
- pymcdev/pymc-repeater:sha-2b7b2b5
```
<!-- github-comment-id:4660183627 -->
Without docker built on native Raspberry OS the KISS-TNC is recognized but does not RXing or TXing, maybe same issue?
Usually, a user who needs serial port access, needs to be in the dialout group as far as i know.
> Without docker built on native Raspberry OS the KISS-TNC is recognized but does not RXing or TXing, maybe same issue?
Usually, a user who needs serial port access, needs to be in the dialout group as far as i know.
<!-- github-comment-id:4661952871 -->
Hi. I tested both images with a fresh install on my Intel Machine. Both images show the same behaviour:
Access to /dev/ttyACM0 denied.
Here is what i did for both images:
added /dev/ttyACM0 to devices in docker-compose.yml
docker compose up (Log showed error with KISS Modem)
> [@UnImAtrIXzEr0](https://github.com/UnImAtrIXzEr0) and [@StreetPiet](https://github.com/StreetPiet) can either of you test the new pymcdev docker image?
>
> tags:
> - pymcdev/pymc-repeater:dev
> - pymcdev/pymc-repeater:sha-2b7b2b5
Hi. I tested both images with a fresh install on my Intel Machine. Both images show the same behaviour:
Access to `/dev/ttyACM0` denied.
Here is what i did for both images:
- added `/dev/ttyACM0` to devices in docker-compose.yml
- `docker compose up` (Log showed error with KISS Modem)
- Looked at the Web Frontend: Radio Degraded Error
- `docker compose exec -u root pymc-repeater /bin/bash`
- `useradd repeater dialout && exit`
- then i restarted the service in the Web Frontend
- Kiss-Modem worked!
- after a `docker compose up --force-recreate`
- again: Radio degraded error
<!-- github-comment-id:4662914577 -->
Commit: 3d97413 — fix: add dialout group to Docker image
If you're able to test it, please update your docker-compose.yml to include:
group_add:- "${DIALOUT_GID:-20}"
and set DIALOUT_GID to match the GID of the dialout group on your host:
getent group dialout
For example, if the output is:
dialout:x:20:
then:
DIALOUT_GID=20
The image now creates the dialout group inside the container and adds the repeater user to dialout, gpio, and spi, which should allow access to serial devices without requiring the container to run as root.
If you get a chance to test it, let me know whether it resolves the serial device access issue on your system. And if it does, I will get the changes into repeater on the upstream image.
yellowcooln/pymc-repeater:sha-3d97413
@StreetPiet
I believe I've identified the issue and put together a fix that correctly maps the host's `dialout` group into the container.
I've opened a test branch here:
https://github.com/yellowcooln/pyMC_Repeater/tree/fix/docker-dialout-group
Commit:
`3d97413` — *fix: add dialout group to Docker image*
If you're able to test it, please update your `docker-compose.yml` to include:
```yaml
group_add:
- "${DIALOUT_GID:-20}"
```
and set `DIALOUT_GID` to match the GID of the `dialout` group on your host:
```bash
getent group dialout
```
For example, if the output is:
```text
dialout:x:20:
```
then:
```env
DIALOUT_GID=20
```
The image now creates the `dialout` group inside the container and adds the `repeater` user to `dialout`, `gpio`, and `spi`, which should allow access to serial devices without requiring the container to run as root.
If you get a chance to test it, let me know whether it resolves the serial device access issue on your system. And if it does, I will get the changes into repeater on the upstream image.
```
yellowcooln/pymc-repeater:sha-3d97413
```
<!-- github-comment-id:4665615235 -->
If you get a chance to test it, let me know whether it resolves the serial device access issue on your system. And if it does, I will get the changes into repeater on the upstream image.
yellowcooln/pymc-repeater:sha-3d97413
Hi!
it worked out of the Box for me as non-root docker container.
Well done!
> If you get a chance to test it, let me know whether it resolves the serial device access issue on your system. And if it does, I will get the changes into repeater on the upstream image.
>
> ```
> yellowcooln/pymc-repeater:sha-3d97413
> ```
Hi!
it worked out of the Box for me as non-root docker container.
Well done!
<!-- github-comment-id:4769298867 -->
This has now been implemented in the current official Repeater images.
The Docker image adds the non-root repeater user to the dialout group, and the current Compose configuration supports mapping the host’s numeric dialout GID into the container:
group_add:- "${DIALOUT_GID:-20}"
Please use the current official image rather than the older pymcdev/* or test images:
image:openhop/openhop-repeater:main
To update an existing installation:
docker compose pull
docker compose up -d --force-recreate
Make sure the serial device is mapped into the container:
devices:- /dev/ttyACM0:/dev/ttyACM0
Also check the host’s dialout GID:
getent group dialout
For example, if that returns:
dialout:x:20:
set the following in .env:
DIALOUT_GID=20
The original reporter confirmed that the fixed non-root image worked out of the box. I also verified the current published image and confirmed that the repeater process receives both its built-in dialout membership and a host-configured supplementary GID.
Please try the current official image and Compose configuration. This issue should now be resolved.
This has now been implemented in the current official Repeater images.
The Docker image adds the non-root `repeater` user to the `dialout` group, and the current Compose configuration supports mapping the host’s numeric dialout GID into the container:
```yaml
group_add:
- "${DIALOUT_GID:-20}"
```
Please use the current official image rather than the older `pymcdev/*` or test images:
```yaml
image: openhop/openhop-repeater:main
```
To update an existing installation:
```bash
docker compose pull
docker compose up -d --force-recreate
```
Make sure the serial device is mapped into the container:
```yaml
devices:
- /dev/ttyACM0:/dev/ttyACM0
```
Also check the host’s dialout GID:
```bash
getent group dialout
```
For example, if that returns:
```text
dialout:x:20:
```
set the following in `.env`:
```env
DIALOUT_GID=20
```
The original reporter confirmed that the fixed non-root image worked out of the box. I also verified the current published image and confirmed that the `repeater` process receives both its built-in `dialout` membership and a host-configured supplementary GID.
Please try the current official image and Compose configuration. This issue should now be resolved.
<!-- github-comment-id:5029685874 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hi, I hope i'm doing this right...
I built the Docker-Image on a Raspberry Pi zero and had Problems with connecting the KISS-Modem on /dev/ttyACM0
My Solution:
i added
usermod -a -G dialout $USERto the dockerfile:@yellowcooln
I will have a PR in to fix shortly.
Without docker built on native Raspberry OS the KISS-TNC is recognized but does not RXing or TXing, maybe same issue?
@UnImAtrIXzEr0 and @StreetPiet can either of you test the new pymcdev docker image?
Usually, a user who needs serial port access, needs to be in the dialout group as far as i know.
Hi. I tested both images with a fresh install on my Intel Machine. Both images show the same behaviour:
Access to
/dev/ttyACM0denied.Here is what i did for both images:
/dev/ttyACM0to devices in docker-compose.ymldocker compose up(Log showed error with KISS Modem)docker compose exec -u root pymc-repeater /bin/bashuseradd repeater dialout && exitdocker compose up --force-recreate@StreetPiet
I believe I've identified the issue and put together a fix that correctly maps the host's
dialoutgroup into the container.I've opened a test branch here:
https://github.com/yellowcooln/pyMC_Repeater/tree/fix/docker-dialout-group
Commit:
3d97413— fix: add dialout group to Docker imageIf you're able to test it, please update your
docker-compose.ymlto include:and set
DIALOUT_GIDto match the GID of thedialoutgroup on your host:For example, if the output is:
then:
The image now creates the
dialoutgroup inside the container and adds therepeateruser todialout,gpio, andspi, which should allow access to serial devices without requiring the container to run as root.If you get a chance to test it, let me know whether it resolves the serial device access issue on your system. And if it does, I will get the changes into repeater on the upstream image.
Hi!
it worked out of the Box for me as non-root docker container.
Well done!
This has now been implemented in the current official Repeater images.
The Docker image adds the non-root
repeateruser to thedialoutgroup, and the current Compose configuration supports mapping the host’s numeric dialout GID into the container:Please use the current official image rather than the older
pymcdev/*or test images:To update an existing installation:
Make sure the serial device is mapped into the container:
Also check the host’s dialout GID:
For example, if that returns:
set the following in
.env:The original reporter confirmed that the fixed non-root image worked out of the box. I also verified the current published image and confirmed that the
repeaterprocess receives both its built-indialoutmembership and a host-configured supplementary GID.Please try the current official image and Compose configuration. This issue should now be resolved.