Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo
Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo
When VPNs Just Work™, they're a fantastic way of allowing access to a private network from remote locations. When they don't work it can be an experience in frustration. I've had situations where I can connect to a VPN from my Mac, but various networking situations cause routing conflicts. Here are a couple of cases and how I've been able to get around them.
In this example the VPN we are connecting to has a subnet that does not conflict with our local IP, but has additional routes that conflict in some way with our local network's routing. In my example the remote subnet is 10.0.x.0/24, my local subnet is 10.0.y.0/24, and the conflicting route is 10.0.0.0/8. Without the later route, I can't access all hosts on the VPN without manually adding the route after connecting to the VPN:
docker run \ | |
--name={{.Name}} \ | |
{{range $e := .Config.Env}}--env={{printf "%q" $e}} \ | |
{{end}}{{range $p, $conf := .NetworkSettings.Ports}}{{with $conf}}-p {{(index $conf 0).HostIp}}:{{(index $conf 0).HostPort}}:{{$p}} \ | |
{{end}}{{end}}{{range $n, $conf := .NetworkSettings.Networks}}{{with $conf}}--network {{printf "%q" $n}} \ | |
{{range $conf.Aliases}}--network-alias {{printf "%q" .}} {{end}} \ | |
{{end}}{{end}}{{range $v := .HostConfig.VolumesFrom}}--volumes-from={{printf "%q" .}} \ | |
{{end}}{{range $v := .HostConfig.Binds}}--volume={{printf "%q" .}} \ | |
{{end}}{{range $l, $v := .Config.Labels}}--label {{printf "%q" $l}}={{printf "%q" $v}} \ | |
{{end}}{{range $v := .HostConfig.CapAdd}}--cap-add {{printf "%q" .}} \ |
Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Moby VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).
docker run -it --rm --privileged --pid=host justincormack/nsenter1
more info: https://github.com/justincormack/nsenter1
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
1. screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty | |
2. when done use CTRL-A CTRL-\ and then y (for yes) to exit | |
Alternative method: | |
1. docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh | |
import groovy.json.JsonSlurper | |
import org.sonatype.nexus.repository.storage.Asset | |
import org.sonatype.nexus.repository.storage.StorageFacet | |
def DOCKER_REPOSITORY_NAME = 'docker-hosted' | |
def dockerRepository = repository.repositoryManager.get(DOCKER_REPOSITORY_NAME) | |
def dockerBlobStore = blobStore.blobStoreManager.get(dockerRepository.configuration.attributes.storage.blobStoreName) | |
def storageTx = dockerRepository.facet(StorageFacet.class).txSupplier().get() | |
try { |