Forum Discussion

SylvainLeroux's avatar
SylvainLeroux
New Contributor
1 month ago

Link the 1Password CLI in a container to the 1Password application on the host

First, thanks to all the Team for making dev tools available to 1Password family subscribers. It allows solo developers like me to use integration solutions during development at a budget price.

Regarding integration, I try to access secrets using the 1Password CLI from a Docker container. I'd like to find a solution to link the CLI tool (in the container) to the 1Password application (running on the host).

I already solved similar situations by using bind mounts to share the communication socket between a client and its server.

However, I am unable to locate the Unix socket used by the 1Password CLI and 1Password Application to communicate.

Could you give me some guidelines? Are there other, more straightforward ways to link the 1Password CLI in a container to the 1Password application on the host?

FWIW:

  • I run the latest stable version of 1Password CLI and application
  • Both the host and the containers are based on Debian
  • Arch is amd64
  • I have a family subscription
  • Using an OP_SERVICE_ACCOUNT_TOKEN stored in an environment variable is not a solution, as the visible service account token may leak into other unintended applications running in the dev container (e.g., VS Code).

    Regards,
    -- Sylvain

No RepliesBe the first to reply