Change frontend port, cannot connect to server
zyrgit opened this issue · comments
Hello,
I'm trying to change the OSRM frontend (and backend) port number to support multiple dockers on one machine. I want to use 9999 on frontend instead of 9966. Here is how I changed the dockerfile:
FROM alpine:3.5
Enables customized options using environment variables
ENV OSRM_BACKEND='http://0.0.0.0:5001'
ENV OSRM_CENTER='39.752107,-89.488859'
ENV OSRM_ZOOM='13'
ENV OSRM_LANGUAGE='en'
ENV OSRM_LABEL='Car (fastest)'
Copy package.json
RUN mkdir -p /src
COPY package.json /src
Install app dependencies
RUN apk add --no-cache sed nodejs &&
cd /src &&
npm install
Create app directory
COPY . /src
WORKDIR /src
Run App
EXPOSE 9999
CMD ["npm", "start"]
In the command line, I used:
docker build . -f docker/Dockerfile -t osrm-frontend
docker run -p 9999:9999 -d --restart=unless-stopped osrm-frontend:latest
But still, connection to server from both localhost or IP is reset, or refused, using curl.
However, default 9966 port works fine. I think I didn't cleanly and completely change all required configurations. Can someone tell me where I missed? Thanks a lot!
Should be :
docker run -p 9999: 9966 -d --restart=unless-stopped osrm-frontend:latest