tl;dr: cernekee/stoken in a container.
It's based on cernekee's PPA as described here.
Entrypoint is stoken
itself, therefore any params to container will be passed as is. See stoken docs for more information on how to use it.
To provide persistency, /root
is designated as a volume. If you like to import a seed file, put it in a directory and mount it when running the container. stoken keeps a file named .stokenrc
there.
- Add token seed.
- Generate token.
It's possible to run stoken without password and also without a pin using stoken setpin
, refer to stoken docs.
read -s SEED_PASSWORD
docker run --rm --interactive --volume ~/stoken:/root mehmetahsen/stoken import --random <<EOF
$SEED_PASSWORD
$SEED_PASSWORD
EOF
read -s SEED_PASSWORD
STOKEN_PIN='0000' # No pin default
docker run --rm --interactive --volume ~/stoken:/root mehmetahsen/stoken <<EOF
$SEED_PASSWORD
$STOKEN_PIN
EOF