diff --git a/Dockerfile b/Dockerfile index 8448c25..0bded06 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -FROM base/archlinux:latest +FROM archlinux/base:latest RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen ENV LC_ALL=en_US.UTF-8 \ LANG=en_US.UTF-8 -RUN pacman -Syy --noconfirm +RUN pacman -Syu --noconfirm RUN pacman -S --noconfirm reflector && reflector --verbose -l 200 -p http --sort rate --save /etc/pacman.d/mirrorlist @@ -19,4 +19,8 @@ COPY requirements.txt /tmp/requirements.txt RUN pip3 install -r /tmp/requirements.txt -ADD docker/confd /etc/confd \ No newline at end of file +ADD docker/confd /etc/confd + +COPY ./GeoIPCity.dat /tmp/ + +RUN mkdir -p /usr/share/GeoIP/ && mv /tmp/GeoIPCity.dat /usr/share/GeoIP/GeoIPCity.dat diff --git a/GeoIPCity.dat b/GeoIPCity.dat new file mode 100644 index 0000000..c165cc2 Binary files /dev/null and b/GeoIPCity.dat differ diff --git a/Makefile b/Makefile index c442e4b..c730062 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ basenc: docker build -t medved_base . --no-cache up: - docker-compose up + docker-compose up --scale worker=$(workers) upd: docker-compose up -d diff --git a/README.md b/README.md index 26ba063..3854d69 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,7 @@ -# medved -alpha beta whatever -partly works +# Medved +This is extensible network scanner (Masscan-based). - -## configuration +## Configuration `data/config.yaml` ``` @@ -140,13 +138,19 @@ logging: Storage: DEBUG Loader: DEBUG ``` -probably it can be launched with docker, however I didn't test it yet -run `make base && docker-compose up --build --scale worker=5` +## Requirements +* `docker >=18.09` +* `docker-composer >=1.24` -or simply `python medved.py` +## Building Docker image -you'll need working redis and mongodb for default configuration +Run `make base && docker-compose up --build --scale worker=5` + +## Running + +Run `make up workers=5` +This launches a scanner with 5 workers. ## top-level services diff --git a/docker/core/Dockerfile b/docker/core/Dockerfile index 7f472b6..3849b46 100644 --- a/docker/core/Dockerfile +++ b/docker/core/Dockerfile @@ -7,10 +7,6 @@ RUN git clone https://github.com/robertdavidgraham/masscan && \ make -j && \ mv bin/masscan /bin/masscan -RUN wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz && gunzip GeoLiteCity.dat.gz - -RUN mkdir -p /usr/share/GeoIP/ && mv GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat - ADD files/torrc /etc/tor/torrc ADD files/run.sh /tmp/run.sh diff --git a/docker/worker/Dockerfile b/docker/worker/Dockerfile index 7d8c4dd..4985413 100644 --- a/docker/worker/Dockerfile +++ b/docker/worker/Dockerfile @@ -7,10 +7,6 @@ RUN git clone https://github.com/robertdavidgraham/masscan && \ make -j && \ mv bin/masscan /usr/bin/masscan -RUN wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz && gunzip GeoLiteCity.dat.gz - -RUN mkdir -p /usr/share/GeoIP/ && mv GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat - ADD files/run.sh /tmp/run.sh CMD ["/tmp/run.sh"]