How to expose docker container’s ip and port to outside docker host without port mapping?

You can accomplish this with IP aliasing on the host. First, add a virtual interface on the host that has a different IP address than the primary interface. We’ll call the primary interface eth0 with IP 10.0.0.10, and the virtual interface eth0:1 with IP address 10.0.0.11. ifconfig eth0:1 10.0.0.11 netmask 255.255.255.0 up Now run the … Read more

Nodejs random free tcp ports

You can bind to a random, free port assigned by the OS by specifying 0 for the port. This way you are not subject to race conditions (e.g. checking for an open port and some process binding to it before you get a chance to bind to it). Then you can get the assigned port … Read more

Changing the default port for iPython notebook server / Jupyter

jupyter notebook –ip=0.0.0.0 –port=80 or ipython notebook –ip=0.0.0.0 –port=80 is what i did to run ipython in my vagrant box. (Opened up the ports on the vagrant box to access it on my host mac) usage: ipython [-h] [–certfile NOTEBOOKAPP.CERTFILE] [–ip NOTEBOOKAPP.IP] [–pylab [NOTEBOOKAPP.PYLAB]] [–log-level NOTEBOOKAPP.LOG_LEVEL] [–port-retries NOTEBOOKAPP.PORT_RETRIES] [–notebook-dir NOTEBOOKAPP.NOTEBOOK_DIR] [–config NOTEBOOKAPP.CONFIG_FILE] [–keyfile NOTEBOOKAPP.KEYFILE] [–port … Read more

How to run different apps on single Tomcat instance behind different ports?

I think you can configure that in you server.xml file and put 2 services : <Service name=”app1″> <Connector port=”8081″ protocol=”org.apache.coyote.http11.Http11NioProtocol” connectionTimeout=”20000″ redirectPort=”8443″ /> <Engine name=”Catalina” defaultHost=”localhost”> <Host name=”localhost” appBase=”app1″ unpackWARs=”true” autoDeploy=”true”> </Host> </Engine> </Service> <Service name=”app2″> <Connector port=”8082″ protocol=”org.apache.coyote.http11.Http11NioProtocol” connectionTimeout=”20000″ redirectPort=”8443″ /> <Engine name=”Catalina” defaultHost=”localhost”> <Host name=”localhost” appBase=”app2″ unpackWARs=”true” autoDeploy=”true”> </Host> </Engine> </Service>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)