docker install snipe-it

docker run --rm snipe/snipe-it ##获取APP_KEY

建立存放目录
sudo mkdir /data/snipe-mysql -p
sudo mkdir /data/snipe-conf -p

创建数据库
docker run \\
--name snipe-mysql \\
-d \\
-e MYSQL_ROOT_PASSWORD=\"snipe\" \\
-e MYSQL_DATABASE=snipe \\
-e MYSQL_USER=snipe \\
-e MYSQL_PASSWORD=\"snipe\" \\
-e TZ=Asia/Shanghai \\
-p 3306:3306 \\
-v /data/snipe-mysql:/var/lib/mysql \\
mysql:5.6 --sql-mode=\"\"

创建snipe-it容器

docker create \\
--name=snipe-it \\
--link snipe-mysql:db \\
-e PUID=1000 \\
-e PGID=1000 \\
-e DB_CONNECTION=mysql \\
-e DB_HOST=snipe-mysql \\
-e DB_DATABASE=snipe \\
-e DB_USERNAME=snipe \\
-e DB_PASSWORD=\"snipe\" \\
-e APP_KEY=base64:notjFUOp7jE9kGYuHuaiwTgqAvjOT5ilGJYNUTD2tII= \\
-e APP_URL=http://10.1.1.5:8082 \\
-p 8082:80 \\
-v /data/snipe-conf:/config \\
--restart unless-stopped \\
snipe/snipe-it