Git Product home page Git Product logo

dockermirror's Introduction

dockermirror

Docker mirroring for networks without internet connectivity

CLI usage

python3 -m dockermirror --help

API usage

Create archive:

curl -v -H 'Content-Type: application/json' -XPOST -d '{"images": ["debian:latest", "python:3"]}' http://dockermirror:5000/api/v1/archive

Check url from location header for status:

curl -v http://localhost:5000/api/v1/job/69e0eb21-7847-481a-96e6-2af2f773efa7

When the job has finished it is possible to check archive information from the status url location header as long as the file still exists:

curl -v http://dockermirror:5000/api/v1/archive/_sYP7FfCCETSPeaNkQFXH69DLAPORf7ly2EhpGSQ1Ak.tar

Archive volume

In non-dev environments the docker-compose files are configured to use a named docker volume called archives handled externally. That means that this volume should be preinitialized before starting the containers.

# Example bind mounted named volume
docker volume create --opt type=none --opt o=bind --opt device=/path/to/archives --name archives

Run dockermirror command in docker container

docker-compose run --rm dockermirror <dockermirror_args>

Run API server in docker containers

docker-compose -f api-docker-compose.yml up -d

Run tests

docker-compose -f test-docker-compose.yml run --rm dockermirror-test

dockermirror's People

Contributors

hkbakke avatar omaen 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.