Skip to main content
July 19, 2024
Question

1Password CLI Biometric Authentication in Dev Container

  • July 19, 2024
  • 3 replies
  • 806 views

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

3 replies

March 6, 2025

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/).

April 16, 2026

I have been battling with this same issue for some time, there is no straight forward way to do it in a dev container currently. It's a massive shame given that containers are ubiquitous these days. 

I hope at some point they manage to develop a similar feature, either in the VScode extension or by using a similar method to the SSH agent, to pass through.

theo
April 16, 2026

I've been working on something for this within https://varlock.dev

Would love some beta testers of this feature before rolling it out - hop in our discord :)