Coder Social home page Coder Social logo

devdocs-airgap's Introduction

devdocs-airgap

Host a mirror of DevDocs.io on a machine without any internet access.

Thanks to freeCodeCamp for the great tool they provide.

This is useful in corporate environment where security rules prevent ANY outside access.

Building takes quite a long time, so be patient.

With Docker

Image size is about 14-18 GB

First, work online

Build a self-contained image containing everything needed (~15 mins) :

docker build --pull --rm -f "Dockerfile" -t devdocsairgap:latest "."

Move to an air-gapped Docker environment

Export your image, move it to your air-gapped Docker environment.

Finaly, run it :

docker run --rm -it -p 8080:8080/tcp devdocsairgap:latest

Then point your browser to http://localhost:8080

Or export a non-Docker, standalone-archive

Archive size is about 2.5 GB (~25 mins)

docker run --rm -it -v.:/host devdocsairgap:latest ./dda.sh -h /host archive

See section Then, switch to air-gapped and follow its instructions.

You can test the exported archive, using a secondary Docker image

To verify that the prepared archive actually works (~20 mins) :

docker build --pull --rm -f "Dockerfile.test-archive" -t devdocsairgap:latest "."

Finaly, run it :

docker run --rm -it -p 8080:8080/tcp devdocsairgap:latest

Then point your browser to http://localhost:8080

Without Docker

This has been tested on Debian only.

First, work online

First get everything needed :

sudo ./dda.sh apt
./dda.sh src
./dda.sh setup

Export a standalone-archive

Then, build an self-contained devdocs-airgap.tar.bz2 archive :

./dda.sh archive

Only devdocs-airgap.tar.bz2 remains useful from now on.

Everything else can be cleaned to reclaim space.

Then, switch to air-gapped

Move this devdocs-airgap.tar.bz2 archive to an air-gapped Debian host.

Decompress the archive and move into it.

Then, deploy everything in-situ :

sudo ./dda.sh apt
./dda.sh setup

Finaly, run it :

./dda.sh serve

Then point your browser to http://localhost:8080

Finally, set up an autostart using your system launcher.

Docker image structure

$HOME/devdocs-airgap/
    ruby-install/ (compiled)
    ruby-$DDA_RV.tar.gz
    ruby-$DDA_RV.tar.gz.sha256
    ruby-$RUBY_VERSION/ (temporary)
    bundler-$BUNDLER_VERSION.gem
    bundle-devdocs-$DDA_DDC.tar.bz2
    devdocs-$DDA_DDC.zip
    devdocs-$DEVDOC_COMMIT/
        public/docs/ (fetched documentation)

devdocs-airgap's People

Contributors

nipil avatar

Watchers

 avatar

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.