Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.37 KB

README.md

File metadata and controls

36 lines (27 loc) · 1.37 KB

image build and push

stoken-docker

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.

How?

  1. Add token seed.
  2. Generate token.

It's possible to run stoken without password and also without a pin using stoken setpin, refer to stoken docs.

Add a random seed

read -s SEED_PASSWORD
docker run --rm --interactive --volume ~/stoken:/root mehmetahsen/stoken import --random <<EOF                                          
$SEED_PASSWORD
$SEED_PASSWORD
EOF

Generate a token

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