NodeJS app deployed on Docker refused connection with local Couchbase server

My NodeJS app is able to connect with my local Couchbase server when I run it locally, but when I deploy my app on Docker, Couchbase gives the “Connection refused” error. This is my Dockerfile:

FROM node:carbon

MAINTAINER API Builder
WORKDIR /usr/src/profileinfo
RUN npm install
COPY . .

EXPOSE 8443
CMD [ "npm", "start" ]

How do I fix this error?

I’d recommend turning up logging (see docs) and see which port is blocked based on the log output.