-
-
Notifications
You must be signed in to change notification settings - Fork 46
Build EMBArk
MAC or Windows: If you are using docker desktop on a Mac or windows machine. Remove line network_mode: host
from docker-compose.yml
Windows: If you are using docker desktop windows machine. The database host inside env would be host.docker.internal
Version of docker-compose: Currently our compose file is compatible with docker-compose version 1.25.x
and 1.27.x
. 1.28.x
and 1.29.x
are already available and by default you will end up with latest version unless you specify explicitly while installing. Please install version1.27.x
until we can test more current versions.
- Clone embark github repository i.e
git clone [email protected]:e-m-b-a/embark.git
- Change directory to root of the repository i.e
embark
- Clone original
emba
repository (git clone https://github.com/e-m-b-a/emba.git
) - Run
cd emba && sudo ./installer.sh -F
to force install all the dependencies on your host. This enables functionalities like CVE Search. - Setup docker environment (see below)
Refer to template.env
, you will see the following env variables
1. DATABASE_NAME: Name of the sql database
2. DATABASE_USER: User of the database
3. DATABASE_PASSWORD: For for logging in to the database
4. DATABASE_HOST: host of the database
5. DATABASE_PORT: port
6. MYSQL_ROOT_PASSWORD: Root password. Always equal to DATABASE_PASSWORD for our dev setups
7. MYSQL_DATABASE: Database that gets created on MySql Container startup. Same as DATABASE_NAME
8. REDIS_HOST: Host of Redis DB
9. REDIS_PORT: Port of Redis DB
We are not maintaining a central copy for now. Till then please main your own copy wherever you setup your dev environment.
-
Build your image
docker-compose build
-
Before bringing your containers up rename
template.env -> .env
and edit.env
file should to look like:
DATABASE_NAME=<Name you are going to give your db>
DATABASE_USER=root
DATABASE_PASSWORD=<value of MYSQL_ROOT_PASSWORD>
DATABASE_HOST=0.0.0.0(or host.docker.internal for windows)
DATABASE_PORT=3306
MYSQL_ROOT_PASSWORD=<This should be set>
MYSQL_DATABASE=<Same as DATABASE_NAME>
REDIS_HOST=0.0.0.0(or host.docker.internal for windows)
REDIS_PORT=6379
- Bring your containers up
docker-compose up -d
- Restart your emba container. This step is important to create the needed database environment!
docker-compose restart emba
- How to exec into your emba-django container
docker exec -it embark_emba_1 bash
Test if django application (uWSGI workers) came up
curl -XGET 'http://0.0.0.0:8000'
You should get a response like this:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<h1>EMBArk home!</h1>
</body>
Whenever you change any code in embark
(django project). You will have to make it live. Since all our code is mounted through compose.
Developers just need to run the following command -
docker-compose restart emba
If you change code in the templates or static, just make sure your browser reloads the files e.g. just open in private browser window.
If you want to run something from inside the container like a shell script to analyze some firmware
- Paste that firmware inside directory
embark
- Exec(Enter) into your container with
docker exec -it embark_emba_1 bash
- Run your script.
EMBArk - firmware security scanning at its best
Sponsor EMBA and EMBArk:
The EMBA environment is free and open source!
We put a lot of time and energy into these tools and related research to make this happen. It's now possible for you to contribute as a sponsor!
If you like EMBArk you have the chance to support future development by becoming a Sponsor
Thank You ❤️ Get a Sponsor
EMBArk - firmware security scanning at its best