sengorius / docker-proxy-stack Goto Github PK
View Code? Open in Web Editor NEWLocal proxy development network with docker containers.
Home Page: https://sengorius.github.io/repositories/docker-proxy/index.html
License: MIT License
Local proxy development network with docker containers.
Home Page: https://sengorius.github.io/repositories/docker-proxy/index.html
License: MIT License
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
}
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?
The description says: Run DockerExec create-cert
and follow the prompts.
The DockerExec help
says, use DockerExec do init-certs
for generating the initial certificates.
If you install docker-proxy-stack on MacOS, you need to install a library that ships realpath
.
Use brew: brew install coreutils
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.