From de4a830930128d2568c7d4e203c06f2f824b4d72 Mon Sep 17 00:00:00 2001 From: jose nazario Date: Thu, 13 Jul 2017 15:05:01 -0400 Subject: [PATCH 1/6] Create Dockerfile --- Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a604dc9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +# Dockerfile for running combine - https://github.com/mlsecproject/combine +# written by Jose Nazario from Kyle Maxwell's + +MAINTAINER jose nazario jose@monkey.org +FROM python:2 +RUN groupadd -r combine && \ + useradd -r -g combine -d /home/combine -s /sbin/nologin -c "Combine user" combine + +WORKDIR /home/combine +USER combine +ENV HOME /home/combine +ENV USER combine +ADD . /home/combine +COPY combine-example.cfg /home/combine/combine.cfg +USER root +RUN pip install -r requirements.txt && \ + chown -R combine:combine /home/combine +USER combine +CMD ["python", "combine.py", "-e"] From a528c6cfbdac763df61bc8dd5ddc283b1487599b Mon Sep 17 00:00:00 2001 From: jose nazario Date: Thu, 13 Jul 2017 15:30:56 -0400 Subject: [PATCH 2/6] Create .dockerignore --- .dockerignore | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..30197eb --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +.git +.gitignore +*.swp +*.csv +README.md From 10b72e9146c13e537039f43dc0b56f8f6f085013 Mon Sep 17 00:00:00 2001 From: jose nazario Date: Thu, 13 Jul 2017 15:32:01 -0400 Subject: [PATCH 3/6] Create README-Docker.md --- README-Docker.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 README-Docker.md diff --git a/README-Docker.md b/README-Docker.md new file mode 100644 index 0000000..9c38b3c --- /dev/null +++ b/README-Docker.md @@ -0,0 +1,21 @@ +# combine-docker + +A simple Dockerfile for running [Combine](https://github.com/mlsecproject/combine). Also on [Docker Hub](https://registry.hub.docker.com/u/technoskald/combine/). + +The easiest way to run is simply: + +``` +sudo docker pull technoskald/combine +sudo docker run --rm -v `pwd`/harvest.csv:/combine/harvest.csv technoskald/combine +``` + +This will put the results in the `/combine` directory. Replace the path after the colon in the command line if desired. + +If you prefer to use the Docker file rather than pull from the Docker Hub, then run with something like: +``` +sudo docker build . +``` +Then note the ID at the end and run: +``` +sudo docker run --rm -v `pwd`/harvest.csv:/combine/harvest.csv IDHERE +``` From eefdf75b57a0f1406a4bcef4b5053c6e1777787d Mon Sep 17 00:00:00 2001 From: jose nazario Date: Thu, 13 Jul 2017 15:32:21 -0400 Subject: [PATCH 4/6] Delete .dockerignore --- docker/.dockerignore | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 docker/.dockerignore diff --git a/docker/.dockerignore b/docker/.dockerignore deleted file mode 100644 index 30197eb..0000000 --- a/docker/.dockerignore +++ /dev/null @@ -1,5 +0,0 @@ -.git -.gitignore -*.swp -*.csv -README.md From 61ddd44488e9b364c8ddac1d9c1eac90f9350239 Mon Sep 17 00:00:00 2001 From: jose nazario Date: Thu, 13 Jul 2017 15:32:33 -0400 Subject: [PATCH 5/6] Delete Dockerfile --- docker/Dockerfile | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 docker/Dockerfile diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index 6661eec..0000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -# Dockerfile for running combine - https://github.com/mlsecproject/combine -# written by Kyle Maxwell - -#MAINTAINER Kyle Maxwell, krmaxwell@gmail.com -FROM ubuntu:14.04 -RUN apt-get update && \ - apt-get dist-upgrade -y -RUN apt-get install -y --no-install-recommends \ - python-pip \ - python-dev \ - build-essential \ - python-virtualenv \ - git && \ - - groupadd -r combine && \ - useradd -r -g combine -d /home/combine -s /sbin/nologin -c "Combine user" combine - -WORKDIR /home -RUN git clone https://github.com/mlsecproject/combine.git && \ - chown -R combine:combine /home/combine && \ - cd combine && \ - pip install -r requirements.txt - -USER combine -ENV HOME /home/combine -ENV USER combine -COPY combine.cfg /home/combine/ -WORKDIR /home/combine -CMD ["python", "combine.py", "-e"] From d3dab972ad510bc071ef344a357e38803c781875 Mon Sep 17 00:00:00 2001 From: jose nazario Date: Thu, 13 Jul 2017 15:32:40 -0400 Subject: [PATCH 6/6] Delete README.md --- docker/README.md | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 docker/README.md diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index 9c38b3c..0000000 --- a/docker/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# combine-docker - -A simple Dockerfile for running [Combine](https://github.com/mlsecproject/combine). Also on [Docker Hub](https://registry.hub.docker.com/u/technoskald/combine/). - -The easiest way to run is simply: - -``` -sudo docker pull technoskald/combine -sudo docker run --rm -v `pwd`/harvest.csv:/combine/harvest.csv technoskald/combine -``` - -This will put the results in the `/combine` directory. Replace the path after the colon in the command line if desired. - -If you prefer to use the Docker file rather than pull from the Docker Hub, then run with something like: -``` -sudo docker build . -``` -Then note the ID at the end and run: -``` -sudo docker run --rm -v `pwd`/harvest.csv:/combine/harvest.csv IDHERE -```