defaultnamehere / zzzzz

Roleplay as the NSA by making creepy graphs of your friends
MIT License
1.3k stars 131 forks source link

Provide a Dockerfile #39

Open jdrago999 opened 8 years ago

jdrago999 commented 8 years ago

Many projects include a Dockerfile which allows other folks to quickly run the project in a controlled environment.

Provide one for this project.

Tasks:

ondrejmo commented 8 years ago

+1 Dockerfile would make it much better.

pielco11 commented 6 years ago

I hardly understand why one would use a docker container for this project since you have to store logs in your hdd (not the container's one) and process them not in real time, so after the execution. So, just starting with this, we are allocating memory, cpu and resources in general, for nothing more.

By the way, I made a couple of docker containers: pielco11/zzzzz:original and pielco11/zzzzz:es. The first one is the original repo, to use it do:

  1. docker pull pielco11/zzzzz:original
  2. docker run -v /full/path/to/SECRETS.txt:/zzzzz/SECRETS.txt pielco11/zzzzz:original
  3. to watch the log: first find the container id of the corresponding image with docker container ls and than run docker logs -f.

The second one is a more interesting one with a little sense of existence. It requires elasticsearch and nothing less than kibana. Why them? Just look in my fork, there you'll see (for every question don't hesitate to ask). I decided to use the default networking mode (bridge) so what you will have to do is:

  1. docker pull pielco11/zzzzz:es;
  2. Open $elasticsearch_home_path/config/elasticsearch.yml and add network.host: 127.0.0.1 and http.host: 0.0.0.0, so that elasticsearch will expose its APIs over http and let them accessible from "everywhere";
  3. Run ifconfig and look for docker, if you have more docker interfaces (docker1, docker2,...) and don't know what to use just run docker run --rm -it ubuntu:trusty bash -il and than route and look for Gateway (since every container is running, by default, with bridge net mode, the gateway is one, and is your interface that let you communicate with docker containers). It will be likely 172.12.0.1;
  4. Finally run docker run -v /full/path/to/SECRETS.txt:/zzzzz/SECRETS.txt pielco11/zzzzz:es ip where ip is the one that you previously found.

Again, for every question don't hesitate to ask. If I'm missing your point, please let me know.