Skip to content

Container fails to build with Node 14 and bash script installation #15

@pleonex

Description

@pleonex

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. 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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions