freeCodeCamp / freeCodeCamp/rdb-alpha
Container fails to build with Node 14 and bash script installation
- Dominant language
- Dockerfile
- Stars
- 173
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
The container doesn't build anymore because it tries to install Node 14 with a deprecated script. The bash scripts from NodeSource are [deprecated](https://github.com/nodesource/distributions). Also Node 14 is also deprecated, I guess that combination doesn't work anymore with the latest packages of Ubuntu 20.04.
**To Reproduce**
Steps to reproduce the behavior:
Try to re-build the container following the instructions from the repository.
**Expected behavior**
It builds :)
**Desktop (please complete the following information):**
- OS: Windows 11 with Docker for Windows
**Additional context**
Replacing the installation of Node with new approach and using Node 18 seems to work.
No idea if the course projects would work with Node 18.
```dockerfile
ENV NODE_MAJOR=18
RUN sudo apt-get update && \
sudo apt-get install -y ca-certificates curl gnupg && \
sudo mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list && \
sudo apt-get update && \
sudo apt-get install nodejs -y
```
Contributor guide
Assessment
This issue has not been assessed yet.