diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..89d2c75 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3-slim + +# Add a work directory +WORKDIR /opt/synapse + +# Copy the files from outside directory into the container image +COPY . . + +# Install python dependencies +RUN set -eu \ + ;pip3 install --no-cache --no-cache-dir -r requirements.txt + +# Expose the default port 5000 +EXPOSE 5000 + +# Activate our "entrypoint script" app.py +ENTRYPOINT [ "./app.py"] diff --git a/README.md b/README.md index be69185..c75333e 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,14 @@ Have a look at the detailed [user guide](docs/user_guide.md), but in short: While all OS running python3 can be used for Synapse, we recommend the use of Ubuntu. +## Running in Docker + + 1. Build Image: ```docker build -t synapse .``` + 2. Run Container: ```docker run -d --name synapse -p 5000:5000 synapse``` + + You can also mount the config file for easier adjustments + ```docker run -d --name synapse -v ${pwd}/conf/synapse.conf:/opt/synapse/conf/synapse.conf -p 5000:5000 synapse``` + ## Roadmap * Alert creation from QRadar offense