Open masavini opened 5 years ago
I thought docker containers didn't have persistent state ?
I know you have your last pass in a persistent volume . I am new to docker so I am trying to understand how that is supposed to work to keep your session state persistent ? When you restart your docker container are you passing in your log in info again ? Even though the last pass volume is persistent still seems like you would have to pass the login to docker ...because to last pass that would be logging into a completely new machine. Just trying to see my failure in understanding.
i solved simply logging in with the --plaintext-key
option and mounting a host directory for the config dir persistency.
less secure, but perfectly working...
hi, i create a simple docker image for lastpass-cli with this Dockerfile:
then i create a container, mounting a volume for persistence:
i login, setting the agent to never quit:
so far, so good: the agent never quits, and i can run lpass commands for the whole day without having to login again:
if i stop and start the container again, however, it gets logged out... i guess it's because when the container is stopped, the agent quits as well, no matter the LPASS_AGENT_TIMEOUT=0 nor the persistent volume...
i've also tried committing a new image from the logged in container, but any container started from the new image is not logged in...
is any way to let the login survive a container restart?