Skip to content

Instantly share code, notes, and snippets.

@zinuzoid
zinuzoid / SwarmModeNetworking.md
Created November 15, 2016 12:06 — forked from alexellis/SwarmModeNetworking.md
Mesh networking tester for Swarm Mode

Here's a quick tester for Swarm Mode that will work everywhere..

$ docker service create --name nginx1 -p 80:80 --mode=global --mount source=/etc/hostname,target=/usr/share/nginx/html/index.html,type=bind,ro nginx

You effectively bind mount the hostname as the index.html page meaning you can see the round-robin / mesh networking in action.

/*
* Copyright (C) 2014 Jake Wharton
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
diff -U 0 -N support-v4-19.1.0/android.support.v4.BuildConfig support-v4-20.0.0/android.support.v4.BuildConfig
--- support-v4-19.1.0/android.support.v4.BuildConfig 1969-12-31 16:00:00.000000000 -0800
+++ support-v4-20.0.0/android.support.v4.BuildConfig 2014-06-26 19:59:59.000000000 -0700
@@ -0,0 +1,9 @@
+public final class android.support.v4.BuildConfig {
+ public static final boolean DEBUG;
+ public static final java.lang.String PACKAGE_NAME;
+ public static final java.lang.String BUILD_TYPE;
+ public static final java.lang.String FLAVOR;
+ public static final int VERSION_CODE;