misp-docker/README.md

67 lines
2.4 KiB
Markdown
Raw Normal View History

2018-06-20 09:20:39 +02:00
MISP Docker
===========
[![](https://travis-ci.org/MISP/misp-docker.svg?branch=master)](https://travis-ci.org/yaleman/misp-docker)
2018-06-20 09:20:39 +02:00
The files in this repository are used to create a Docker container running a [MISP](http://www.misp-project.org) ("Malware Information Sharing Platform") instance.
I rewrote the Docker file to split the components in multiple containers (which is more in the philosophy of Docker). Therefore there is no longer a Dockerfile in the root directory.
2018-06-20 09:20:39 +02:00
The MISP container needs at least a MySQL container to store the data. By default it listen to port 80. I highly recommend to serve it behind a NGinx or Apache reverse proxy.
The build is based on Ubuntu and will install all the required components. The following configuration steps are performed automatically:
* Reconfiguration of the base URL in `config.php`
* Generation of a new salt in `config.php`
* Generation of a self-signed certificate
* Optimization of the PHP environment (php.ini) to match the MISP recommended values
* Creation of the MySQL database
* Generation of the admin PGP key
2018-06-22 19:52:20 +02:00
## Config
* add your "*.crt" and "*.key" files to the ./proxy/ssl folder
If not implementing SSL (not recommended) then simply comment out the appropriate lines in the "./proxy/default.conf" file.
2018-06-22 19:52:20 +02:00
* Update "server_name" in default.conf file (will implement ENVIRONMENT VARIABLE in the future)
2019-05-02 06:14:48 +02:00
# Optional NGINX config
Included is an optional Docker Compose file 'docker-compose-nginx.yml' to spin up a reverse proxy to sit in front of MISP.
2018-06-22 19:52:20 +02:00
2018-06-20 13:05:21 +02:00
# Building your image
2018-06-20 09:20:39 +02:00
2018-06-20 13:05:21 +02:00
## Fetch files
2018-06-20 09:20:39 +02:00
```
$ git clone https://github.com/MISP/misp-docker
$ cd misp-docker
2019-08-21 17:39:53 +02:00
# Copy template.env to .env (on the root directory) and edit the environment variables at .env file
$ cp template.env .env
$ vi .env
2018-06-20 09:20:39 +02:00
```
2018-06-20 13:05:21 +02:00
## Build the containers
2018-06-20 09:20:39 +02:00
```
$ docker-compose build
or
$ docker-compose -f docker-compose-nginx.yml build
```
## Run containers
```
$ docker-compose up
or
$ docker-compose -f docker-compose-nginx.yml up
2018-06-20 09:20:39 +02:00
```
2020-12-04 18:13:45 +01:00
# Optional NGINX config - SSL certificates
You can create the certificates manually if they are not automatically created.
```
openssl req -new -nodes -x509 -subj "/C=BE/ST=Brussels/L=Brussels/O=CTI/CN=localhost" -days 3650 -newkey rsa:4096 -keyout proxy/ssl/misp.key -out proxy/ssl/misp.crt
```
Then rebuild the proxy container and restart al the containers.
```
docker-compose -f docker-compose-nginx.yml build --no-cache proxy
docker-compose -f docker-compose-nginx.yml up
```