Skip to content

Conversation

@FlorentPoinsaut
Copy link
Contributor

Hello,
I suggest this modification to fix this error

$ docker run --cap-drop all --user 100:101  --rm -it barcus/bareos-storage:21-alpine sh
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/docker-entrypoint.sh": permission denied: unknown.

@barcus
Copy link
Owner

barcus commented May 22, 2024

Hello @FlorentPoinsaut
I tried to remove the chmod command from Dockerfile but at the end this file can not be executed any more !
Also with this new build i still got the same error

docker run --cap-drop all --user 100:101  --rm -it local/bareos-storage:21-alpine sh
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/docker-entrypoint.sh": permission denied: unknown.

As you can see I used bareos-storage:21-alpine as a test

@barcus
Copy link
Owner

barcus commented May 22, 2024

entrypoint.sh script should be executable.
we can solve this issue with chmod a+x instead of chmod u+x but finally user 100 or group 101 is not able to change some bareos stuff unless we force the owner of mounted volumes/files, as you can see there:

docker run --cap-drop all --user 100:101  --rm -it local/bareos-storage:21-alpine sh
touch: /etc/bareos/bareos-config.control: Permission denied
chown: /var/lib/bareos/archive: Operation not permitted
chown: /var/lib/bareos/storage: Operation not permitted
/ $

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants