Dockerization of snorby web app (without snort,barnyard2....)
10K+
Docker image with Snorby using Debian-8 Jessie and Ruby on Rails.
This Container only embedded the snorby web interface and connect to a database. To deploy the container, you just need to specify the database information to connect to. If your database is not already yet, the container can install/reset/delete it for you
In this Image you can use environmental variables to connect into external MySQL/MariDB database.
docker run -d --name snorby -p 80:80 --env="MYSQL_HOST=database_ip" --env="MYSQL_USER=snorby" \
--env="MYSQL_PASSWORD=snorby" troptop/docker-snorby
MYSQL_HOST = Database hostnameMYSQL_DBNAME = Database Name that you want to createMYSQL_USER = User name that will have access to the databaseMYSQL_PASSWORD = The password of the user that will have access to the databaseYou need to use the following Environmental Variable :
ADD_DBUSER= If different to "false" (minuscule) the container will create a user called MYSQL_USER
with ALL privileges to the MYSQL_DBNAME database.
If the ADD_DBUSER is set the following ENV are required too :
MYSQL_ADMIM= Admin user with the privileges to create the databaseMYSQL_ADMINPASS = Admin password to create the databaseMYSQL_HOST = Database hostnameMYSQL_DBNAME = Database Name that you want to createMYSQL_USER = User name that will have access to the databaseMYSQL_PASSWORD = The password of the user that will have access to the databaseDELETEDB= If different to "false" (minuscule) the container will drop the database called MYSQL_DBNAME.
If the DELETEDB is set the following ENV are required too :
MYSQL_ADMIM= Admin user with the privileges to create the databaseMYSQL_ADMINPASS = Admin password to create the databaseMYSQL_HOST = Database hostnameMYSQL_DBNAME = Database Name that you want to createRESETDB= If different to "false" (minuscule) the container will reset the database called MYSQL_DBNAME. it swipe all the data (metric/events/alert...) except user data (users table)
If the RESETDB is set the following ENV are required too :
MYSQL_HOST = Database hostnameMYSQL_DBNAME = Database Name that you want to createMYSQL_USER = User name that will have access to the databaseMYSQL_PASSWORD = The password of the user that will have access to the databaseINSTALLDB= If different to "false" (minuscule) the container will create a database called MYSQL_DBNAME.
If the INSTALLDB is set the following ENV are required too :
MYSQL_HOST = Database hostnameMYSQL_DBNAME = Database Name that you want to createMYSQL_USER = User name that will have access to the databaseMYSQL_PASSWORD = The password of the user that will have access to the databaseExample : This example will create a container that : - firstly delete the database snorby (if exist)
docker run -d --name snorby -p 80:80 --env="MYSQL_HOST=database_ip" --env="MYSQL_USER=snorby" \
--env="MYSQL_PASSWORD=snorby" --env="MYSQL_DBNAME=snorby" --env="DELETEDB" --env="MYSQL_ADMIN=root" \
--env="MYSQL_ADMINPASS=rootpassword" troptop/docker-snorby
- secondly create a new database snorby
- finally start the snorby web application
docker run -d --name snorby -p 80:80 --env="MYSQL_HOST=database_ip" --env="MYSQL_USER=snorby" \
--env="MYSQL_PASSWORD=snorby" --env="MYSQL_DBNAME=snorby" --env="INSTALLDB" --env="MYSQL_ADMIN=root" \
--env="MYSQL_ADMINPASS=rootpassword" troptop/docker-snorby
Visit your snorby_ip:port to access snorby interface and use default credentials:
Username: [email protected]
Password: snorby
To be able to connect to database we would need one to be running first. Easiest way to do that is to use another docker image. Example:
docker run \
-d \
--name snorby-db \
--env="MYSQL_USER=snorby" \
--env="MYSQL_PASSWORD=snorby" \
--env="MYSQL_DATABASE=snorby" \
--env=" MYSQL_ROOT_PASSWORD=my_password" \
mariadb
Author: Cymatic ([email protected]) - www.cymatic.eu
Content type
Image
Digest
Size
419.3 MB
Last updated
over 8 years ago
docker pull troptop/docker-snorby