container: remove host port binding

This commit is contained in:
Alan Chen 2017-08-25 14:23:50 +08:00
parent 9862079bf0
commit d90e5240c0
3 changed files with 0 additions and 14 deletions

View File

@ -185,7 +185,6 @@ func (bc *blockchain) CreateNodes(num int, options ...Option) (nodes []Ethereum,
return nil, err
}
opts = append(opts, HostDataDir(dataDir))
opts = append(opts, HostPort(freeport.GetPort()))
opts = append(opts, HostWebSocketPort(freeport.GetPort()))
geth := NewEthereum(
@ -260,7 +259,6 @@ func (bc *blockchain) setupValidators(keys []*ecdsa.PrivateKey, options ...Optio
log.Fatal("Failed to create data dir", err)
}
opts = append(opts, HostDataDir(dataDir))
opts = append(opts, HostPort(freeport.GetPort()))
opts = append(opts, HostWebSocketPort(freeport.GetPort()))
opts = append(opts, Key(keys[i]))

View File

@ -194,17 +194,6 @@ func (eth *ethereum) Start() error {
exposedPorts := make(map[nat.Port]struct{})
portBindings := nat.PortMap{}
if eth.port != "" {
port := fmt.Sprintf("%d", utils.ListenPortFlag.Value)
exposedPorts[nat.Port(port)] = struct{}{}
portBindings[nat.Port(port)] = []nat.PortBinding{
{
HostIP: "0.0.0.0",
HostPort: eth.port,
},
}
}
if eth.rpcPort != "" {
port := fmt.Sprintf("%d", utils.RPCPortFlag.Value)
exposedPorts[nat.Port(port)] = struct{}{}

View File

@ -34,7 +34,6 @@ func TestEthereumContainer(t *testing.T) {
ImageRepository("quay.io/amis/geth"),
ImageTag("istanbul_develop"),
DataDir("/data"),
HostPort(freeport.GetPort()),
WebSocket(),
WebSocketAddress("0.0.0.0"),
WebSocketAPI("admin,eth,net,web3,personal"),