I created the docker image of node js 12 application using the following docker file. How can I run my image with the port I specified? How can I do port mapping? I want to use the port I mentioned above.
Docker file as given below:
FROM node:12
WORKDIR /app
COPY ./package*.json ./
RUN npm ci --production
COPY ./ ./
ENV PORT 5000
ENV HOST_URL localhost:$PORT
EXPOSE $PORT
CMD [ "npm", "run", "start" ]
I used these port and host in my node js 12 application:
export PORT=5000
export HOST_URL=https://hellosigntest.xxx
I built a image given below:
docker build -t hellosigndemo:1.0 .