Skip to content

Instantly share code, notes, and snippets.

View mavenugo's full-sized avatar

Madhu Venugopal mavenugo

  • Apple
  • Cupertino, CA
View GitHub Profile
madhu@Madhus-MBP ~ $ docker network create --subnet=40.1.1.0/24 my-user-net
68f40c6cd46aae2fd5388b03020e75741ebba6eeca04251068a2b9d509df2e9f
madhu@Madhus-MBP ~ $ docker run --name=my-svc1 --ip=40.1.1.2 --net=my-user-net -itd busybox sh
072b141a23caf54af5e6091a8eda847787e61eb209d207246d1c7c7bebf4096c
madhu@Madhus-MBP ~ $ docker run --name=my-svc2 --ip=40.1.1.3 --link=my-svc1:mysvc --net=my-user-net -itd busybox sh
84093ed474d985091698db550d9b503c8ac65c7742c7056951e0c21deba3c66c
madhu@Madhus-MBP ~ $ docker exec -it my-svc2 sh
madhu@Madhus-MBP ~ $ docker network create --subnet=40.1.1.0/24 my-user-net
68f40c6cd46aae2fd5388b03020e75741ebba6eeca04251068a2b9d509df2e9f
madhu@Madhus-MBP ~ $ docker run --name=my-svc1 --ip=40.1.1.2 --net=my-user-net -itd busybox sh
072b141a23caf54af5e6091a8eda847787e61eb209d207246d1c7c7bebf4096c
madhu@Madhus-MBP ~ $ docker run --name=my-svc2 --ip=40.1.1.3 --link=my-svc1:mysvc --net=my-user-net -itd busybox sh
84093ed474d985091698db550d9b503c8ac65c7742c7056951e0c21deba3c66c
madhu@Madhus-MBP ~ $ docker exec -it my-svc2 sh
madhu@Madhus-MBP ~ $ docker network create --subnet=40.1.1.0/24 my-user-net
68f40c6cd46aae2fd5388b03020e75741ebba6eeca04251068a2b9d509df2e9f
madhu@Madhus-MBP ~ $ docker run --name=my-svc1 --ip=40.1.1.2 --net=usernet -itd busybox sh
e2102faca296b413587c81185140b96a6125191031fa1256163f3bfa2a1da139
docker: Error response from daemon: Invalid address 40.1.1.2: It does not belong to any of this network's subnets.
madhu@Madhus-MBP ~ $
madhu@Madhus-MBP ~ $ docker run --name=my-svc1 --ip=40.1.1.2 --net=my-user-net -itd busybox sh
docker: Error response from daemon: Conflict. The name "/my-svc1" is already in use by container e2102faca296b413587c81185140b96a6125191031fa1256163f3bfa2a1da139. You have to remove (or rename) that container to be able to reuse that name..
See 'docker run --help'.
madhu@Madhus-MBP ~ $ docker run --name=my-svc1 --ip=40.1.1.2 --net=my-user-net -itd busybox sh
/Users/madhu/Downloads/madhu-editions.pem
madhu@Ubuntu-vm docker (stend) $ sudo docker service ls
ID NAME REPLICAS IMAGE COMMAND
madhu@Ubuntu-vm docker (stend) $ sudo docker service create --replicas=1 --name=sw4 -p 5001:5000 mrjana/simpleweb simpleweb
918laq4vhqv0l59m8x9to2f4m
madhu@Ubuntu-vm docker (stend) $ sudo docker service inspect sw4
[
{
"ID": "918laq4vhqv0l59m8x9to2f4m",
DEBU[0085] Calling POST /v1.25/swarm/leave?force=1
INFO[0092] === BEGIN goroutine stack dump ===
goroutine 30 [running]:
github.com/docker/docker/pkg/signal.DumpStacks()
/go/src/github.com/docker/docker/pkg/signal/trap.go:74 +0x98
github.com/docker/docker/daemon.setupDumpStackTrap.func1(0xc8202b9d40)
/go/src/github.com/docker/docker/daemon/debugtrap_unix.go:18 +0x5e
created by github.com/docker/docker/daemon.setupDumpStackTrap
/go/src/github.com/docker/docker/daemon/debugtrap_unix.go:20 +0x13f

Keybase proof

I hereby claim:

  • I am mavenugo on github.
  • I am mavenugo (https://keybase.io/mavenugo) on keybase.
  • I have a public key whose fingerprint is AC32 28EA 5F80 756C 01E7 BB9F 8F5D 212A 4CCC F1C9

To claim this, I am signing this object:

#!/bin/sh
# vim: ft=sh sw=2 ts=2 st=2 sts=2 et
#
# NOTE
#
# see the bottom of this script for all the test batteries executed as
# functions -- comment out what you don't want to run!
#
# edit the variables below to tweak some common parameters.
#!/bin/sh
# vim: ft=sh sw=2 ts=2 st=2 sts=2 et
#
# NOTE
#
# see the bottom of this script for all the test batteries executed as
# functions -- comment out what you don't want to run!
#
# edit the variables below to tweak some common parameters.