Tag: port

Publishing Docker by proxing with NGINX, how to change port?

I need to create a sevice at port 12345, but the instructions say docker run -p 80:8080 swaggerapi/swagger-ui … Can I change the host port (the final publishing is it?), from 80 to 12345? Change the host port or the container port? So, I will use docker run -p 12345:8080 swaggerapi/swagger-ui… It will work fine? […]

How to expose more ports on a running docker container

I have exposed port 3306 on my docker container, and I would like to install a web server on it and expose port 80 on the same container.

Is it possible to set a different host port than the container's exposed port in docker?

Is it possible to set a different host port than the container’s exposed port in docker? For example docker run -name some_container -p 80:8080 -i -t some_img If so, is it -p host:container or -p container:host? I’ve looked through the docs and haven’t found any examples of this nor details on the publish option for […]

Restrict published port to a specific container with Docker

I have two Docker images : a tomcat image, exposing the port 8080 a mysql image, exposing the port 3306 I run two containers using these images, linking mysql with tomcat : docker run -itd -p 3306:3306 –name mysql mysql docker run -itd -p 8080:8080 –link mysql:mysql –name tomcat tomcat When I do that, tomcat […]

Running a Docker container with the -p or -P flag causes it to fail

I have recently started moving my simple blog app into a docker container. I created my own dockerfile and built the image successfully and it runs the webapp with no issues however if I add the -P or -p 8080:8080 flags to the run command it fails with error: mathew@mathew-laptop:goblog:-> docker run -it -P chasinglogic/test […]

Docker Toolbox port mapping not working

I have installed docker toolbox on a windows machine, after running a container with the following command, I didn’t see anything listening on my host machine’s specified port (82). docker run -ti -p 82:80 –name=container_alias someprovider/image:some_tag I did attach to this contianer and did a simple check inside the container using: curl localhost:80 it did […]

How to use `docker-machine create` so that the docker engine listens on a custom port?

My service provider does not allow me to connect to docker on port 2376. Is there a flag for docker-machine to set up docker on host to listen on another port but 2376 so that commands like docker-machine ls OR docker-machine env work? Now they fail because after creation of docker on the host the […]

Configuring Couchbase connection ports through their Node.js API [Docker]

I am using an official Couchbase Docker container. Some important ports Couchbase server uses. Those are exposed through the container as random ports on the host. Is there a way to supply those host ports on obtaining a Couchbase server connection? Something akin to how the server is configured preinstall but for the client. I […]

Docker port not overriden

I want to expose a docker container port on a different host port. docker run -d –net=”host” –name=”couchpotato2″ -p 5555:5050 … However, I don’t get the mapping of 5555 -> 5050. Any idea why? CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 114ae1617632 needo/couchpotato “/sbin/my_init” 3 seconds ago Up 2 seconds couchpotato3 Here is the […]

How to open port for docker container?

I have a database on production (real os). And have docker-container with webserver and cgi (running on the same server). And I cant get access to production database from container. How to open port (for example 3306) and make it visible in container? Thank you.

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.