Git Product home page Git Product logo

docker-proxy-stack's People

Contributors

2ndkauboy avatar sanklamm avatar sengorius avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-proxy-stack's Issues

Adding a Quota for single Docker containers

Goal is to limit the amount of data that is not in the layers of base image, but in the diff of a Docker container.

A goad attempt can be found here: https://stackoverflow.com/questions/29029326/how-to-define-a-disk-quota-for-docker-containers
This one may fit in the DockerExec.

do_enable_quota() {
    local ID=$1
    local QUOTA_MB=$2

    local LOOPBACK=/var/lib/docker/aufs/diff/$ID-loopback
    local LOOPBACK_MOUNT=/var/lib/docker/aufs/diff/$ID-loopback-mount
    local DIFF=/var/lib/docker/aufs/diff/$ID

    docker stop -t=0 $ID
    sudo dd of=$LOOPBACK bs=1M seek=$QUOTA_MB count=0
    sudo mkfs.ext4 -F $LOOPBACK
    sudo mkdir -p $LOOPBACK_MOUNT
    sudo mount -t ext4 -n -o loop,rw $LOOPBACK $LOOPBACK_MOUNT
    sudo rsync -rtv $DIFF/ $LOOPBACK_MOUNT/
    sudo rm -rf $DIFF
    sudo mkdir -p $DIFF
    sudo umount $LOOPBACK_MOUNT
    sudo rm -rf $LOOPBACK_MOUNT
    sudo mount -t ext4 -n -o loop,rw $LOOPBACK $DIFF
    docker start $ID    
}

Create certificates with Docker

An attempt was made, using a docker container to create the necessary SSL certificates. This would be useful on a Windows system, where openssl is not installed. But the printf (generate.sh at line 44) statement on the docker command line is a problem. The current attempt was bound to commit 6db0be3 and used following idea:

local SYSTEM_HAS_OPENSSL=`command -v openssl`
if [[ "1" == "$?" ]]; then
    print_warning "Openssl seems not to be installed on this machine. Trying to install with docker."
    RSA_COMMAND=docker\ run\ --user\ "$(id -u):$(id -g)"\ -i\ -v\ "${CERTS_PATH}:/export"\ "${OPENSSL_IMAGE}"\ openssl
    CERTS_PATH=/export
fi

See generate.sh at line 20 for details.

Maybe someone else knows a solution for this?

Installing on MacOS

If you install docker-proxy-stack on MacOS, you need to install a library that ships realpath.

Use brew: brew install coreutils

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.