AxisCommunications / docker-compose-acap

ACAP application to add dockerd and docker-compose to a container capable Axis device
Apache License 2.0
1 stars 4 forks source link

Not able to access docker commands after restarting or stopping docker-compose #175

Open ThenoobMario opened 2 months ago

ThenoobMario commented 2 months ago

Describe the bug

I have been testing my application by upgrading to Axis 11.11 firmware and using the Docker Compose 3.0.0 ACAP. While the initial setup works perfectly fine. I am not able to call docker commands from my application once I restart or stop the docker-compose ACAP. The issue is also aggravated if the camera restarts.

The problem was not solved by toggling "Allow Root Access". On reinstalling the ACAP, the issue goes away. I am not sure where the error occurs in the process.

Environment

Additional context

On looking at the system logs, I noticed that the post-install script fails with an exit code 1. I don't know if this is related to the issue.

madelen-at-work commented 1 month ago

Duplicate of #162 This issue is fixed in AXIS OS LTS 2024 11.11 from 11.11.109. Upcoming AXIS OS 12 will also have the fix.

ThenoobMario commented 1 month ago

Hi @madelen-at-work, on restarting the camera manually, the problem persists. I am not able to call the docker commands.

madelen-at-work commented 1 month ago

Hi @ThenoobMario, I can confirm the issue on AXIS OS 11.11.109. The problem is that the correct path to the docker socket is lost at reboot. We will look into a fix. In the meantime a work-around would be to let your application specifically point out the correct path as described in Daemon socket option The correct path will be unix:///var/run/user/<uid>/docker.sock where <uid> is the user id of the user of Docker Compose ACAP, acap-dockerdwrapperwithcompose. The user id can be retrieved e.g. with id -u acap-dockerdwrapperwithcompose

ThenoobMario commented 1 month ago

Okay, I shall try that!