docker / getting-started

Getting started with Docker
Apache License 2.0
2.91k stars 6.4k forks source link

Couldnt install nodejs and npm through docker file #428

Open Sangeetha06 opened 9 months ago

Sangeetha06 commented 9 months ago

151.4 Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

Dockerfile:8

7 | # Install Node.js and npm from the NodeSource repository 8 | >>> RUN curl -sL https://rpm.nodesource.com/setup_14.x | bash - \ 9 | >>> && yum -y install nodejs 10 |

ERROR: failed to solve: process "/bin/sh -c curl -sL https://rpm.nodesource.com/setup_14.x | bash - && yum -y install nodejs" did not complete successfully: exit code: 1 Hello Team,

I'm getting this error while building image through docker file. Please help

muhammad-zulqarnain-awan commented 9 months ago

Try using a different mirror or repository by updating the NodeSource URL in your dockerfile. Sometimes the mirror or repository you are using may have some temporary issues.

Use --enablerepo="nodesource" in the command.