Open deepcoder opened 6 months ago
hi @deepcoder ,
Under docker, even if I sudo docker run, I receive the following error for the disk info.
Using 'sudo docker run' is not doing what you think probably. The 'docker' program is just a client for the dockerd server which runs as a daemon in background. The 'docker' client is just asking the server to start a new container when you use 'docker run'. Doing that with root permissions does not mean that the new container will be started by the server with root permissions. To do that, you should be using 'docker run --privileged'. This is mentioned in the README at https://github.com/eschava/psmqtt?tab=readme-ov-file#deploy-with-docker Can you retry with --privileged?
I was using the 'privileged' in both my non sudo and sudo attempts, as per your documentation. Both throw the same error. The docker commands I tried are listed below. FYI, trying to use ":latest" for the image threw a different error and would not start container, so I hard coded the v1 image version.
docker run -d -v /home/user/psmqtt/psmqtt.conf:/opt/psmqtt/conf/psmqtt.conf \
--privileged --hostname $(hostname) \
ghcr.io/eschava/psmqtt:latest
docker run -d -v /home/user/psmqtt/psmqtt.conf:/opt/psmqtt/conf/psmqtt.conf \
--name="psmqtt-1.0.0" \
--privileged --hostname $(hostname) \
ghcr.io/eschava/psmqtt:1.0.0
I was using the 'privileged' in both my non sudo and sudo attempts, as per your documentation. Both throw the same error. The docker commands I tried are listed below. FYI, trying to use ":latest" for the image threw a different error and would not start container, so I hard coded the v1 image version.
docker run -d -v /home/user/psmqtt/psmqtt.conf:/opt/psmqtt/conf/psmqtt.conf \ --privileged --hostname $(hostname) \ ghcr.io/eschava/psmqtt:latest
You're right the 'latest' tag is not being pushed. FYI I have an issue open on the github action project: https://github.com/mr-smithers-excellent/docker-build-push/issues/238
docker run -d -v /home/user/psmqtt/psmqtt.conf:/opt/psmqtt/conf/psmqtt.conf \ --name="psmqtt-1.0.0" \ --privileged --hostname $(hostname) \ ghcr.io/eschava/psmqtt:1.0.0
This one however should really work. Can you run 'sudo smartctl --scan' (outside of any docker container) and paste the output here?
ping @deepcoder
Under docker, even if I sudo docker run, I receive the following error for the disk info.
Linux yippie-ha 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux
Thank you for your work and help!