Skip to content

Commit

Permalink
Merge 3eed237 into b4a73b1
Browse files Browse the repository at this point in the history
  • Loading branch information
code040 committed May 8, 2015
2 parents b4a73b1 + 3eed237 commit 1b8b35b
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 1 deletion.
61 changes: 61 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Git
.git/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Editor files
*.iml
.idea
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@ docs/_build/

# PyBuilder
target/

# Editor
*.iml
.idea
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Set the base image to Python
FROM python:2.7.9
MAINTAINER Intelworks <opentaxii@intelworks.com>

# Volume for possible input
VOLUME [ "/input" ]

# Create the working dir and set the working directory
WORKDIR /

# Requirements
COPY ./requirements.txt requirements.txt
RUN pip install -r requirements.txt \
&& rm -f requirements.txt

# Install Cabby
RUN mkdir /cabby
COPY ./ /cabby
RUN cd /cabby \
&& python setup.py install \
&& rm -rf /cabby

# Helper
COPY docker/help.sh /help.sh

# Give help, unless command is given
CMD [ "/help.sh" ]

19 changes: 19 additions & 0 deletions docker/help.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

echo "
Commands to be run:
taxii-discovery
taxii-poll
taxii-collections
taxii-push
taxii-subscription
e.g. docker run -ti cabby taxii-discovery --host taxxii.server --path /services/discovery
More information available at: http://cabby.readthedocs.org
Or you can choose to drop back into a shell by providing: bash as the command:
docker run -ti cabby bash
"
32 changes: 31 additions & 1 deletion docs/user.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ To force client to use `TAXII 1.0 <taxii.mitre.org/specifications/version1.0/TAX
client = create_client('hailataxii.com', version='1.0')

.. note::
Cabby client instances configured for TAXII 1.0 or TAXII 1.1 we will have slightly different method signatures (see :doc:`Cabby API documentation<api>` for details).
Cabby client instances configured for TAXII 1.0 or TAXII 1.1 we will have slightly different method signatures (see :doc:`Cabby API documentation<api>` for details).

Using Cabby as a command line tool
==================================
Expand Down Expand Up @@ -94,6 +94,36 @@ Create a subscription::

Use ``--help`` to get more usage details.

Docker Quickstart
=================

To ease the threshold for trying out cabby, it is possible to use the Intelworks provided image.

.. code-block:: shell
docker run cabby
Running this will execute the help script, giving you all the possible options:

.. code-block:: text
Commands to be run:
taxii-discovery
taxii-poll
taxii-collections
taxii-push
taxii-subscription
e.g. docker run -ti cabby taxii-discovery --host taxxii.server --path /services/discovery
More information available at: http://cabby.readthedocs.org
Or you can choose to drop back into a shell by providing: bash as the command:
docker run -ti cabby bash
.. rubric:: Next steps

Expand Down

0 comments on commit 1b8b35b

Please sign in to comment.