forked from p15670423/monkey
Merge pull request #217 from SkypLabs/feature/improve-dockerfile
Improve the Docker image
This commit is contained in:
commit
8ef70850de
|
@ -0,0 +1 @@
|
||||||
|
*.md
|
|
@ -1,19 +1,24 @@
|
||||||
FROM debian:jessie-slim
|
FROM debian:stretch-slim
|
||||||
|
|
||||||
LABEL MAINTAINER="theonlydoo <theonlydoo@gmail.com>"
|
LABEL MAINTAINER="theonlydoo <theonlydoo@gmail.com>"
|
||||||
|
|
||||||
|
ARG RELEASE=1.6
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
EXPOSE 5000
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ADD https://github.com/guardicore/monkey/releases/download/1.5.2/infection_monkey_1.5.2_deb.tgz .
|
ADD https://github.com/guardicore/monkey/releases/download/${RELEASE}/infection_monkey_deb.${RELEASE}.tgz .
|
||||||
|
|
||||||
RUN tar xvf infection_monkey_1.5.2_deb.tgz \
|
RUN tar xvf infection_monkey_deb.${RELEASE}.tgz \
|
||||||
&& apt-get -yqq update \
|
&& apt-get -yqq update \
|
||||||
&& apt-get -yqq upgrade \
|
&& apt-get -yqq upgrade \
|
||||||
&& apt-get -yqq install python-pip \
|
&& apt-get -yqq install python-pip \
|
||||||
libssl-dev \
|
python-dev \
|
||||||
supervisor \
|
&& dpkg -i *.deb \
|
||||||
&& dpkg -i *.deb
|
&& rm -f *.deb *.tgz
|
||||||
|
|
||||||
COPY stack.conf /etc/supervisor/conf.d/stack.conf
|
WORKDIR /var/monkey
|
||||||
|
ENTRYPOINT ["/var/monkey/monkey_island/bin/python/bin/python"]
|
||||||
ENTRYPOINT [ "supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf" ]
|
CMD ["/var/monkey/monkey_island.py"]
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
version: '3.3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: mongo:4
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- db_data:/data/db
|
||||||
|
environment:
|
||||||
|
MONGO_INITDB_DATABASE: monkeyisland
|
||||||
|
monkey:
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
build: .
|
||||||
|
image: monkey:latest
|
||||||
|
ports:
|
||||||
|
- "5000:5000"
|
||||||
|
environment:
|
||||||
|
MONGO_URL: mongodb://db:27017/monkeyisland
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
db_data:
|
|
@ -1,4 +0,0 @@
|
||||||
[program:mongod]
|
|
||||||
command=/var/monkey_island/bin/mongodb/bin/mongod --quiet --dbpath /var/monkey_island/db
|
|
||||||
[program:monkey]
|
|
||||||
command=/var/monkey_island/ubuntu/systemd/start_server.sh
|
|
Loading…
Reference in New Issue