infra/aws/docker/index.js
function (options, cb) {
		let outIP = options.out;
		let stack = options.infra.stack;
		
		if (outIP && stack.options.ElbName) {
			options.soajs.log.debug("Creating SOAJS network.");
			
			dockerUtils.getDeployer(options, (error, deployer) => {
				if(error){
					return cb(error);
				}
				
				deployer.listNetworks({}, (err, networks) => {
					if (err) {
						return cb(err);
					}
					
					let found = false;
					networks.forEach((oneNetwork) => {
						if (oneNetwork.Name === 'soajsnet') {
							found = true;
						}
					});
					
					if(found){
						return cb(null, true);
					}
					else{
						let networkParams = {
							Name: 'soajsnet',
							Driver: 'overlay',
							Internal: false,
							Attachable: true,
							CheckDuplicate: true,
							EnableIPv6: false,
							IPAM: {
								Driver: 'default'
							}
						};
						
						deployer.createNetwork(networkParams, (err) => {
							return cb(err, true);
						});
					}
				});
			});
		}
		else {
			return cb(null, false);
		}
	}
function (options, cb) {
		let outIP = options.out;
		let stack = options.infra.stack;
		
		if (outIP && stack.options.ElbName) {
			options.soajs.log.debug("Creating SOAJS network.");
			
			dockerUtils.getDeployer(options, (error, deployer) => {
				if(error){
					return cb(error);
				}
				
				deployer.listNetworks({}, (err, networks) => {
					if (err) {
						return cb(err);
					}
					
					let found = false;
					networks.forEach((oneNetwork) => {
						if (oneNetwork.Name === 'soajsnet') {
							found = true;
						}
					});
					
					if(found){
						return cb(null, true);
					}
					else{
						let networkParams = {
							Name: 'soajsnet',
							Driver: 'overlay',
							Internal: false,
							Attachable: true,
							CheckDuplicate: true,
							EnableIPv6: false,
							IPAM: {
								Driver: 'default'
							}
						};
						
						deployer.createNetwork(networkParams, (err) => {
							return cb(err, true);
						});
					}
				});
			});
		}
		else {
			return cb(null, false);
		}
	}
function ( options , cb ) { let outIP = options . out ; let stack = options . infra . stack ; if ( outIP && stack . options . ElbName ) { options . soajs . log . debug ( "Creating SOAJS network." ) ; dockerUtils . getDeployer ( options , ( error , deployer ) => { if ( error ) { return cb ( error ) ; } deployer . listNetworks ( { } , ( err , networks ) => { if ( err ) { return cb ( err ) ; } let found = false ; networks . forEach ( ( oneNetwork ) => { if ( oneNetwork . Name === 'soajsnet' ) { found = true ; } } ) ; if ( found ) { return cb ( null , true ) ; } else { let networkParams = { Name : 'soajsnet' , Driver : 'overlay' , Internal : false , Attachable : true , CheckDuplicate : true , EnableIPv6 : false , IPAM : { Driver : 'default' } } ; deployer . createNetwork ( networkParams , ( err ) => { return cb ( err , true ) ; } ) ; } } ) ; } ) ; } else { return cb ( null , false ) ; } }
This method deploys the default soajsnet for docker
@param options
@param cb
@returns {*}
This method deploys the default soajsnet for docker