misp-docker/README.md

87 lines
3.7 KiB
Markdown
Raw Normal View History

2020-01-29 16:26:54 +01:00
# CoolAcid's MISP Docker images
2020-01-29 15:30:26 +01:00
2020-02-08 01:35:40 +01:00
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e9b0c08774a84b9e8e0454f3ac83651f)](https://app.codacy.com/manual/coolacid/docker-misp?utm_source=github.com&utm_medium=referral&utm_content=coolacid/docker-misp&utm_campaign=Badge_Grade_Dashboard)
2020-02-12 14:45:32 +01:00
[![CodeFactor](https://www.codefactor.io/repository/github/coolacid/docker-misp/badge/master)](https://www.codefactor.io/repository/github/coolacid/docker-misp/overview/master)
2020-01-29 15:30:26 +01:00
[![Build Status](https://travis-ci.org/coolacid/docker-misp.svg?branch=master)](https://travis-ci.org/coolacid/docker-misp)
2020-02-27 15:49:29 +01:00
[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/MISP/Docker)
2020-01-29 15:30:26 +01:00
2019-11-25 22:51:08 +01:00
A (nearly) production ready Dockered MISP
2019-11-25 23:02:49 +01:00
2020-01-29 16:26:54 +01:00
This is based on some of the work from the DSCO docker build, nearly all of the details have been rewritten.
2019-11-26 01:23:59 +01:00
2020-02-12 15:18:32 +01:00
- Components are split out where possible, currently this is only the MISP modules
- Over writable configuration files
- Allows volumes for file store
- Cron job runs updates, pushes, and pulls - Logs go to docker logs
- Docker-Compose uses off the shelf images for Redis and MySQL
- Images directly from docker hub, no build required
- Slimmed down images by using build stages and slim parent image, removes unnecessary files from images
2020-01-28 23:42:10 +01:00
2020-02-12 15:18:32 +01:00
## Docker Tags
2020-01-28 23:42:10 +01:00
2020-02-25 02:23:37 +01:00
[Docker hub](https://hub.docker.com/r/coolacid/misp-docker) builds the images automatically based on git tags. I try and tag using the following details
2020-01-29 16:26:54 +01:00
2020-02-12 15:18:32 +01:00
***v\[MISP Version]\[Our build version]***
- MISP version is the MISP tag we're building
- Our build version is the iteration for our changes with the same MISP version
- Core and modules are split into \[core]-version and \[modules]-version respectively
2020-02-12 15:18:32 +01:00
## Getting Started
### Development/Test
2020-02-28 01:53:47 +01:00
- Grab the `docker-compose.yml` and `server-configs/email.php` files (Keep directory structure)
2020-02-12 15:27:48 +01:00
2020-02-28 01:53:47 +01:00
- A dry run will create sane default configurations
2020-02-12 15:27:48 +01:00
2020-02-12 15:18:32 +01:00
- `docker-compose up`
2020-02-12 15:27:48 +01:00
2020-02-12 15:18:32 +01:00
- Login to `https://localhost`
2020-02-12 15:23:47 +01:00
- User: `admin@admin.test`
- Password: `admin`
2020-02-12 15:27:48 +01:00
2020-02-12 15:18:32 +01:00
- Profit
### Using the image for development
2020-02-28 01:53:47 +01:00
Pull the entire repository, you can build the images using `docker-compose -f docker-compose.yml -f build-docker-compose.yml build`
Once you have the docker container up you can access the container by running `docker-compose exec misp /bin/bash`.
This will provide you with a root shell. You can use `apt update` and then install any tools you wish to use.
Finally, copy any changes you make outside of the container for commiting to your branch.
`git diff -- [dir with changes]` could be used to reduce the number of changes in a patch file, however, becareful when using the `git diff` command.
### Updating
Updating the images should be as simple as `docker-compose pull` which, unless changed in the `docker-compose.yml` file will pull the latest built images.
2020-02-12 15:18:32 +01:00
### Production
- It is recommended to specify which build you want to be running, and modify that version number when you would like to upgrade
2020-02-12 15:18:32 +01:00
- Use docker-compose, or some other config management tool
2020-02-12 15:27:48 +01:00
2020-02-25 03:09:08 +01:00
- Directory volume mount SSL Certs `./ssl`: `/etc/ssl/certs`
2020-02-24 18:11:32 +01:00
- Certificate File: `cert.pem`
- Certificate Key File: `key.pem`
2020-02-12 15:27:48 +01:00
- Directory volume mount and create configs: `/var/www/MISP/app/Config/`
2020-02-12 15:27:48 +01:00
2020-02-12 15:18:32 +01:00
- Additional directory volume mounts:
- `/var/www/MISP/app/files`
- `/var/www/MISP/.gnupg`
- `/var/www/MISP/.smime`
2020-02-12 15:18:32 +01:00
## Image file sizes
- Core server(Saved: 2.5GB)
2020-02-12 15:23:47 +01:00
- Original Image: 3.17GB
- First attempt: 2.24GB
- Remove chown: 1.56GB
- PreBuild python modules, and only pull submodules we need: 800MB
- PreBuild PHP modules: 664MB
2020-02-12 15:18:32 +01:00
- Modules (Saved: 640MB)
2020-02-12 15:23:47 +01:00
- Original: 1.36GB
- Pre-build modules: 750MB