DEV Community

Dênis Mendes
Dênis Mendes

Posted on

3

Error: reason: connect ENETUNREACH 2606:4700::6810:1023:443

If you're experiencing that kind of error message when trying to install something related with NodeJS in docker container, you should try that trick, in your Dockerfile adds that command:

ENV NODE_OPTIONS="--dns-result-order=ipv4first"

See my Dockerfile:

FROM node:18.15.0

ENV NODE_OPTIONS="--dns-result-order=ipv4first"

RUN npm install -g @nestjs/cli
Enter fullscreen mode Exit fullscreen mode

I hope it helps you in some way.

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more