Giter Site home page Giter Site logo

target / attack-navigator-docker Goto Github PK

View Code? Open in Web Editor NEW
26.0 6.0 7.0 16 KB

A simple Docker container that serves the MITRE ATT&CK Navigator web app

License: MIT License

Dockerfile 18.45% Makefile 43.17% Shell 38.37%
cfc security detection target-cfc

attack-navigator-docker's Introduction

attack-navigator-docker

A simple Docker container that serves the MITRE ATT&CK Navigator web app

Target’s CFC-Open-Source Slack

Prerequisites

You really just need Docker and an Internet connection.

Building

First, check out the code:

git clone --recurse-submodules https://github.com/target/attack-navigator-docker.git

Now just change directory into the repo and run make:

cd attack-navigator-docker
make

The Build Process Explained

By default, the Makefile will pull down docker containers for nginx (which is the base of the final image we build) and node, which is used during the build process. It will also update the MITRE ATT&CK Navigator app's repo, which we include here as a submodule. Thus, whenever you build, you'll get the latest published version of the app.

Once the images are staged and the app code updated, we run an ephemeral copy of the node container, in which we mount and build the app. The container is automatically deleted at the end of the run, but it leaves the compiled app in attack-navigator/nav-app/dist.

Next, we call docker build with a very simple Dockerfile that just creates an nginx container with the app code copied into the web content directory. That's really all that's necessary to get this app running in Docker.

NOTE: The copy you just built with the makefile will be tagged as ":dev". You can manually tag it with something else if you like (e.g., ":latest").

Running the Container

You have two options. First, you can change directory into the repo and just run make run to start up the container with the most common options. Then just point your browser to http://localhost:80 to access the Navigator. This will run the image version tagged as ":dev", which is typically the last version you built.

Alternatively, if you're Docker friendly, you can run the container manually:

docker run -it -p 80:80 --name attacknav davidjbianco/attacknav:dev

As written, this is the same command the the Makefile uses to start the container, but this way you have the option to specify the exact Docker options you want.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.