I’d like to mount
/dev/serial0 to a privileged container. The container has a Golang binary, so the whole Dockerfile is this:
FROM scratch WORKDIR /usr/src/app COPY ./app/%%BALENA_ARCH%% ./main ENTRYPOINT ["/usr/src/app/main"]
My docker-compose.yml is the following:
version: "2" services: serial: build: ./serial restart: always privileged: true devices: - /dev/serial0
Because the container is privileged, the
devices part isn’t necessary. However, in the container, everything in
/dev is available (like
/dev/ttyS0), but not the
I’ve tried using a Balena base image, and only with UDEV turned on, they show up.
I don’t want to use the Balena base image though, because my container is now 5.5MB and when I’m using the base image, it’s around 90MB.
Anyone has any idea how I can fix this problem?
serial0 is much more reliable to use for every device than using