-
Notifications
You must be signed in to change notification settings - Fork 1
docker
Pavel Serikov edited this page Apr 7, 2018
·
12 revisions
sudo touch ssh
в разделе boot
passwd
sudo nano /etc/hostname
sudo nano /etc/hosts
curl -sSL https://get.docker.com | sh -
docker pull pavelsr/fabkey
docker run -v ${PWD}:/fabkey/data pavelsr/fabkey perl db.pl -a deploy_db -d data/skud.db
docker run -v ${PWD}:/fabkey/data pavelsr/fabkey perl db.pl -a demo_data -d data/skud.db
docker run -v ${PWD}:/fabkey/data pavelsr/fabkey perl db.pl -a deploy_db -d data/skud.db
docker run -v ${PWD}:/fabkey/data pavelsr/fabkey perl db.pl -a manage users insert telegram_username serikoff -d data/skud.db
docker run -v ${PWD}:/fabkey/data perl db.pl -a manage doors insert name Main_door -d data/skud.db
docker run -d --restart=always --name fabkey -e "FABKEY_BOT_TOKEN=<paste_your_token_here>" -e "FABKEY_DBI=dbi:SQLite:dbname=data/skud.db" --privileged -v ${PWD}:/fabkey/data pavelsr/fabkey
docker run -p 3000:80 -v ${PWD}/skud.db:/root/skud.db pavelsr/yancy-fabkey-alpine
docker run -v ${PWD}:/fabkey/data pavelsr/fabkey perl db.pl --help
Новый контейнер
docker run -e "FOO=bar"
Существующий контейнер, после dd:
docker exec -i CONTAINER_ID /bin/bash -c "export VAR1=VAL1 && export VAR2=VAL2 && run_cmd"
Запуск:
Пины rpi по умолчанию
open - Open selected door
users_in - Show who inside (was checkined)
checkin - Make public check-in
checkout - Make public check-out
admin - Show all approval requests
approve - Add particular user to allowed users (better just forward message from /admin back to bot)
addme - Send approval request
https://github.com/pavelsr/FabKey/#running
Какие файлы копируются в контейнер: https://github.com/pavelsr/FabKey/blob/master/perl/Dockerfile#L54