Hi team, would anyone know how to override dockers...
# help
Hi team, would anyone know how to override dockers binding port (8080) in .sh file format? My command looks something like "docker run -d --name $Container -p 8083:8083 $container " DockerFile currently exposes only port 8083, However whenever I create my image in docker it still displays this:
Dockerfile should not matter in these regards. Why do you want to change the port number inside the container, just to be sure? You can change only the binding
I'm running 3 instances of wiremock to run a different service on each one, I'd assume there would be issues if the port in the container remains as 8080 for all of them? I could be wrong but please advise me otherwise 🙂
You could do it with `-p 9090`:`8083` to publish the Docker image's
port to your local host as
then if you had many of these, they'd each have a different port on your host, but the Docker image itself doesn't need to change / know what other ports are in use
👍 2
So it would be
-p 8081:8080
-p 8082:8080
-p 8083:8080
for three Docker calls
Ah okay thanks guys! Appreciate the help