dockervscode-devcontainergnome-keyring-daemon

Why does gnome-keyring-daemon fail with "Operation not permitted" in a Dev Container?


I am trying to follow the Zowe CLI Configuring Secure Credential Store on headless Linux operating systems instructions, however when I run the following commands...

export $(dbus-launch)
gnome-keyring-daemon -r --unlock --components=secrets

...I get this error...

bash: /usr/bin/gnome-keyring-daemon: Operation not permitted

I'm running in a Visual Studio Code Dev Container based on the mcr.microsoft.com/devcontainers/java image.


Solution

  • Thanks to a GitHub issue comment which described the requirement to start containers with --cap-add=IPC_LOCK to run gnome-keyring-daemon, I was able to get the Zowe CLI to work by updating my devcontainer.json file with...

        "capAdd": [
            "IPC_LOCK"
        ],