Forum Discussion

tmarquard's avatar
tmarquard
New Contributor
2 years ago

1Password CLI Biometric Authentication in Dev Container

I like to develop using https://code.visualstudio.com/docs/devcontainers/containers on my MacBook, and I love to be able to load secrets dynamically with the 1Password CLI. Using the 1Password CLI works great when I run commands directly on my mac. However when I setup a DevContainer to develop inside of, the 1Password CLI is not connecting. 1Password SSH biometric authentication still works, but I assume that is because the DevContainer is able to connect to the ssh socket. Can I mount the 1Password CLI socket into the DevContainer so that when I run "op" commands it is able to connect to my host machines 1Password Desktop App? Where is the 1Password CLI socket so that I might mount it?

I should also note that the DevContainer
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm


1Password Version: 1Password for Mac 8.10.36 (81036049)
Extension Version: CLI Version 2.29.0
OS Version: macOS 14.5
Browser: Not Provided

1 Reply

  • andyreagan's avatar
    andyreagan
    New Contributor

    I've had exactly the same question, and it doesn't seem possible. You could use a service account to be able to run the `op` commands from within the container, or you can use the injection to make environment files (https://developer.1password.com/docs/cli/secrets-config-files/).