docker-lpass
Dockerized lpass (lastpass-cli)
207
docker run --rm -it -v ~/.lpass:/root/.lpass returnpath/lpass
This container has a couple helper scripts for prompting for the master password:
bin/bash-askpass: Pass in a string for the prompt text to show, then it will read in your master password and echo it to STDOUT. This will be piped directly into lpass when used as LPASS_ASKPASS.bin/quiet-askpass: Same as bash-askpass but without the prompt. Intended for use when piping (bash PIPE functionality |) the output to other commands. If you do not use this, lpass will attempt to read STDIN and the PIPE will attempt to read STDOUT resulting in a deadlock.To use either of the included askpass scripts, simply set LPASS_ASKPASS to the script name. For example:
# Prompts with: "Enter LastPass Master Password: "
docker run --rm -it -v ~/.lpass:/root/.lpass -e LPASS_ASKPASS=bash-askpass returnpath/lpass show --password -G ".*my-item-regex.*"
# Without prompt
docker run --rm -it -v ~/.lpass:/root/.lpass -e LPASS_ASKPASS=quiet-askpass returnpath/lpass show --password -G ".*my-item-regex.*"
For more advanced usage, see the Official lpass man page
This project is simply packaging and helper scripts for the lpass tool. As such, nothing in this repository is "novel", or "non-obvious". This repo is therefore released under the GPL 2 to comply with the upstream project's license.
The upstream tools are released under various Open Source Licenses:
lpass" is released under the GPL version 2 or later with an exception for linking with OpenSSL.util.c" is released under the ISC License.OpenSSL" is dual-licensed under the OpenSSL License and the SSLeay License.The text of these tool's licenses are included here to avoid confusion.
Content type
Image
Digest
Size
125.2 MB
Last updated
over 9 years ago
Requires Docker Desktop 4.37.1 or later.