This is my Dockerfile and it runs without problems:
FROM node:12 as build
# Install mongo in container for mongodump command
RUN wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | apt-key add -
RUN echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/5.0 main" | tee /etc/apt/sources.list.d/mongodb-org-5.0.list
RUN apt-get update
RUN apt-get install -y mongodb-org
But when I try to update the Node version to 16 (FROM node:16 as build
), I get the following error:
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mongodb-org : Depends: mongodb-org-database but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
How can I update node version without these issues?
This is running on Azure app service, linux operating system.
I run this whenever I deploy.