mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-08-12 00:11:12 -04:00
remove irrelevant dialout user, add docker-compose device mount documentation
This commit is contained in:
parent
ada43e799b
commit
9c36d55518
3 changed files with 14 additions and 8 deletions
|
@ -2,23 +2,23 @@ ARG python_version=3.13
|
||||||
|
|
||||||
FROM python:${python_version}-alpine AS build
|
FROM python:${python_version}-alpine AS build
|
||||||
|
|
||||||
RUN apk add --no-cache build-base linux-headers libffi-dev libressl-dev cargo
|
#RUN apk add --no-cache build-base linux-headers libffi-dev libressl-dev cargo
|
||||||
|
|
||||||
ENV PIP_ROOT_USER_ACTION=ignore
|
ENV PIP_ROOT_USER_ACTION=ignore
|
||||||
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
|
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||||
ENV PIP_NO_CACHE_DIR=1
|
ENV PIP_NO_CACHE_DIR=1
|
||||||
RUN pip install rns
|
RUN pip install rns
|
||||||
|
|
||||||
FROM python:${python_version}-alpine
|
#FROM python:${python_version}-alpine
|
||||||
ARG python_version
|
#ARG python_version
|
||||||
|
|
||||||
# Only copy the necessary files from the build stage, to improve layer efficiency
|
# Only copy the necessary files from the build stage, to improve layer efficiency
|
||||||
COPY --from=build /usr/local/bin/rn* /usr/local/bin/
|
#COPY --from=build /usr/local/bin/rn* /usr/local/bin/
|
||||||
COPY --from=build /usr/local/lib/python${python_version}/site-packages/ /usr/local/lib/python${python_version}/site-packages/
|
#COPY --from=build /usr/local/lib/python${python_version}/site-packages/ /usr/local/lib/python${python_version}/site-packages/
|
||||||
|
|
||||||
RUN mkdir /config
|
RUN mkdir /config
|
||||||
|
|
||||||
RUN addgroup -S rns --gid 1000 && adduser -S rns --uid 1000 -G rns dialout
|
RUN addgroup -S rns --gid 1000 && adduser -S rns --uid 1000 -G rns
|
||||||
RUN chown rns:rns /config
|
RUN chown rns:rns /config
|
||||||
|
|
||||||
USER rns:rns
|
USER rns:rns
|
||||||
|
|
|
@ -20,7 +20,7 @@ COPY --from=build /usr/local/lib/python${python_version}/site-packages/ /usr/loc
|
||||||
|
|
||||||
RUN mkdir /config
|
RUN mkdir /config
|
||||||
|
|
||||||
RUN addgroup -S rns --gid 1000 && adduser -S rns --uid 1000 -G rns dialout
|
RUN addgroup -S rns --gid 1000 && adduser -S rns --uid 1000 -G rns
|
||||||
RUN chown rns:rns /config
|
RUN chown rns:rns /config
|
||||||
|
|
||||||
USER rns:rns
|
USER rns:rns
|
||||||
|
|
|
@ -3,11 +3,17 @@ services:
|
||||||
container_name: reticulum
|
container_name: reticulum
|
||||||
image: ghcr.io/markqvist/reticulum:latest
|
image: ghcr.io/markqvist/reticulum:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
# You can mount devices, make sure to add the user to the group id
|
||||||
|
# which has rw access to the device on the host
|
||||||
|
devices:
|
||||||
|
- /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0:/dev/ttyACM0
|
||||||
|
group_add:
|
||||||
|
- 986
|
||||||
# Mount the config directory on the host in the same location as the docker-compose.yml
|
# Mount the config directory on the host in the same location as the docker-compose.yml
|
||||||
# to allow data persistency
|
# to allow data persistency
|
||||||
volumes:
|
volumes:
|
||||||
- ./config:/config:rw
|
- ./config:/config:rw
|
||||||
# Define ports to expose, for example a TCP Listener
|
# Define ports to expose, for example a default TCP Listener
|
||||||
ports:
|
ports:
|
||||||
- "4242:4242/tcp"
|
- "4242:4242/tcp"
|
||||||
networks:
|
networks:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue