skip to Main Content

Ive installed imgproxy (https://docs.imgproxy.net/installation) on docker on a centos server.

Using

docker run -p 2096:2096 -it darthsim/imgproxy

to start it still starts the server on 8080:

INFO [2021-09-01T10:13:25Z] Starting server at :8080

What is a correct way of starting imgproxy on a non default port (in my cas 2096)?

2

Answers


  1. In the docker run command the ports describe a mapping from the host to the container port. (which by default is 8080:8080)

    So, to map your host’s port 2096 to the container’s 8080 use

    docker run -p 2096:8080 -it darthsim/imgproxy
    
    Login or Signup to reply.
  2. The --publish flag config is [host-port]:[container-port]. To preserve the container’s port of 8080, but use the host’s 2096, you want:

    docker run 
    --interactive --tty --rm 
    --publish=2096:8080 
    darthsim/imgproxy
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search