Why is docker not able to download from github on one machine while it works on another?

  Kiến thức lập trình

I have a Dockerfile that I tested locally where it builds perfectly fine.
Building the same files on a server however fails for both docker build and docker compose

The docker -v is the same for both machines and the Dockerfile looks like this:

FROM node:14.21.3-bullseye

RUN npm install forever -g
RUN npm install jest -g

...

RUN npm install express && npm install websocket && npm install
RUN cd ./public && npm install && npm run sass && npm run coffee

ENTRYPOINT ["./start.sh"]

I’m seing in the logs that the container on the server is not able download files from github, while there is no problems locally.

What can I do so that the container on the server is able to download from github?

LEAVE A COMMENT