Skip to content

xnatworks/xnat-web:1.10.0 cannot run with capabilities dropped #5

Description

@johnflavin

The entrypoint in the current 1.10.0 docker image (sha256:f9f21673e0b854a424c2b4fd6cf9dec00b3ea3339def82e0017f517cbc9e3adb) has 744 perms and is not executable by any user but root.

$ docker run --rm --entrypoint ls xnatworks/xnat-web:1.10.0 -l /usr/local/bin/entrypoint.sh
-rwxr--r-- 1 root root 190 Oct 18  2024 /usr/local/bin/entrypoint.sh

If the image is started with a non-root user and all capabilities dropped (which is good security posture) the entrypoint cannot start.

$ docker run --rm --user 1000 --cap-drop ALL xnatworks/xnat-web:1.10.0
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: error during container init: exec: "/usr/local/bin/entrypoint.sh": permission denied: unknown

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions