# ip addr add 10.0.2.15/24 enp0s3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.nokia.nls.nmif; | |
import io.netty.bootstrap.Bootstrap; | |
import io.netty.buffer.ByteBuf; | |
import io.netty.channel.Channel; | |
import io.netty.channel.ChannelFuture; | |
import io.netty.channel.ChannelFutureListener; | |
import io.netty.channel.ChannelHandler; | |
import io.netty.channel.ChannelHandlerContext; | |
import io.netty.channel.ChannelInboundHandlerAdapter; |
##pull wnameless/oracle-xe-11g
$ sudo docker pull wnameless/oracle-xe-11g
##start the wnameless/oracle-xe-11g
$ sudo docker run -d -p 49160:22 -p 49161:1521 wnameless/oracle-xe-11g
This Gist demos how to make the inter communication between docker containers ( cross node)
###inter communication through Birdge
suppose there are two nodes n1: 192.168.1.1 and n2: 192.168.1.2, in the node n1 start container c1 and in the node n2 start container c2.
-------------------- ------------------------
| | | |
| -------- | | --------- |
###clear unused linux kernel image from /boot
sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"io" | |
"os" | |
"os/exec" | |
) | |
func main() { |
###download the ubuntu core image
download the ubuntu core image like:
$ wget http://releases.ubuntu.com/15.04/ubuntu-15.04-snappy-amd64-generic.img.xz
$ unxz ubuntu-15.04-snappy-amd64-generic.img.xz
###clone the thrift
$ git clone https://github.com/apache/thrift.git
###checkout the thrift-0.8.0
$ cd thrift
$ git checkout thrift-0.8.0
###install the swarm
$ sudo docker pull swarm
###change the docker start options
change the DOCKER_OPTS in /etc/default/docker ( in ubuntu ) or /var/lib/apps/docker/1.6.1.002/etc/docker.conf ( in ubuntu core ) to "-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"