A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/mcuadros/gce-docker below:

mcuadros/gce-docker: Google Cloud Engine integration for Docker

Google Cloud Engine integration for Docker

gce-docker is a service that provides integration with the GCE to Docker, the following resources are supported:

Creating a Persistent Disk and mount is a volume to a Container
docker run -ti -v my-disk:/data --volume-driver=gce busybox df -h /data
Creating a simple Load Balancer with a static IP
docker run -d --label gce.lb.address=104.197.200.230 --label gce.lb.type=static -p 80:80 tutum/hello-world

The recommended way to install gce-docker is use the provided docker image.

Run the driver using the following command:

docker run -d -v /:/rootfs -v /run/docker/plugins:/run/docker/plugins -v /var/run/docker.sock:/var/run/docker.sock --privileged mcuadros/gce-docker

privileged is required since gce-docker needs low level access to the host mount namespace, the driver mounts, umounts and format disk.

The instance requires Read/Write privileges to Google Compute Engine and IP forwarding flags should be active to.

Using docker volume create a new disk is created.

docker volume create --driver=gce --name my-disk -o SizeGb=90

Options:

Using a disk on your container

Just add the flags --volume-driver=gce and the -v <disk-name>:/data to any docker run command:

docker run -ti -v my-disk:/data --volume-driver=gce busybox sh

If the disk already exists will be used, if not a new one with the default values will be created (Standard/500GB)

The disk is attached to the instance, if the disk is not formatted also is formatted with ext4, when the container stops, the disk is unmounted and detached.

The load balancers, are handle by a watcher, waiting for Docker events, the watched events are start and die. When a new containeris created or destroyed, the LoadBalancer and all the others dependant resources are created or deleted too.

This is a small example create a LoadBalancer for a web server:

docker run -d --label gce.lb.type=ephemeral -p 80:80 tutum/hello-world

Available labels:

MIT, see LICENSE


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4