docker run \ --name snipe-mysql \ -d \ -e MYSQL_ROOT_PASSWORD="lf0FSZRWpZmpmlCy" \ -e MYSQL_DATABASE=snipe \ -e MYSQL_USER=snipe \ -e MYSQL_PASSWORD="lf0FSZRWpZmpmlCy" \ -e TZ=Asia/Shanghai \ -p 127.0.0.1:3306:3306 \ -v /media/snipe-mysql:/var/lib/mysql \ mysql:5.6 --sql-mode="" 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="lf0FSZRWpZmpmlCy" \ -e APP_KEY=base64:5U/KPKw1GN/Rz0fWYO/4FsSOqjmjvDAQzMCqwcAqstc= \ -p 8082:80 \ -v /media/snipe-conf:/config \ --restart unless-stopped \ snipe/snipe-it admin / lf0FSZRWpZmpmlCy
参考:
https://www.freesion.com/article/91691224722/