Recently Pipeline apt-get update Fails
Asked by Neha Verma:

Here is my Pipeline file {#toc-hId--468009287}
----------------------------------------------

*** ** * ** ***

![Screenshot 2023-04-24 at 1.23.15 PM.png](/t5/image/serverpage/image-id/253513i9040388FA802204F/image-size/large?v=v2&px=999 "Screenshot 2023-04-24 at 1.23.15 PM.png")

*** ** * ** ***

#### This is the error I am getting {#toc-hId--1574399172}

![Screenshot 2023-04-24 at 1.22.29 PM.png](/t5/image/serverpage/image-id/253512i174A28BC3247506A/image-size/large?v=v2&px=999 "Screenshot 2023-04-24 at 1.22.29 PM.png")  

*** ** * ** ***


Answers:
author: Theodora Boudale
body: Hi [@Neha Verma](/t5/user/viewprofilepage/user-id/5202954),

Just to add some additional information here: I don't think that the issue is related to the version of node, but rather to the version of Debian that this Docker image uses.

The Dockerhub image node:12 is using Debian 9 which is considered EOF (End-Of-Life).

You can see the version locally if you have Docker installed on your computer. You can run the command
> docker run -it --entrypoint=/bin/bash node:12

In the bash prompt of the container that starts, you can run the command

```
cat /etc/os-release
```

This will show you that the image is using Debian 9.

There are multiple tags for the node image:

* <https://hub.docker.com/_/node>
* <https://hub.docker.com/_/node/tags>

I don't know if there is an image with node 12 that is using a later version of Debian. You can follow the steps I outlined above using different tags instead of node:12, in order to check what os and version each image is using, and also the version of other tools that are preinstalled in each Docker image. This way you can decide which image to use instead.

Kind regards,  
Theodora

comments: author: Neha Verma
body: Hi [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) ,

As I have checked, Debian Dockerfile has stopped the support for node tag 12 image because of that I guess I'm getting the error once I changed the tag from 12 to 14 which the last version supported by the docker file of node worked fine for me.

Thanks  
Neha


author: Theodora Boudale
body: Hi Neha,

Thank you for the update. I see that the Dockerhub image **node:14** is based on Debian 10 (while **node:12** is based on Debian 9), which is why there are no errors with it. I'm glad that this works for you, please feel free to reach out if you ever need anything else!

Kind regards,  
Theodora


author: Neha Verma
body: Thank you for your help. :) [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086)


author: Erez Maadani
body: Hi [@Neha Verma](/t5/user/viewprofilepage/user-id/5202954)

If you plan to use the official node images, then yes, it does.

You can look for other images with more recent OS version with same Node version or prepare one your-self.

Each option has its pros and cons so you would need to decide based on your and your project needs.

My personal recommendation would be to upgrade your Node version. Your dependencies are restricted by the Node version and usually it means that they are not up to date with most of security fixes.

comments: author: Neha Verma
body: Hi [@Erez Maadani](/t5/user/viewprofilepage/user-id/5018344) ,

As I have checked, Debian Dockerfile has stopped the support for node tag 12 image because of that I guess I'm getting the error once I changed the tag from 12 to 14 which the last version supported by the docker file of node worked fine for me.

Thanks  
Neha


author: Neha Verma
body: Thank you for your help! :) [@Erez Maadani](/t5/user/viewprofilepage/user-id/5018344)


author: Erez Maadani
body: Hi [@Neha Verma](/t5/user/viewprofilepage/user-id/5202954)

Glad to hear things are working out for you.

To answer your question, you would need to consider few factors:

1. Team/project/work-place policies - are you allowed to just download the latest version and use it? Are there is any restrictions on old versions?

2. Workload vs time consumption - upgrading Node usually means also upgrading dependencies which can be time consuming: changing code and testing breaking changes. The more dependencies in the project, the more time you would need to invest. Also, the bigger the difference between the node versions, the more time you would need to invest.

3. Feasibility - Do all your dependencies support the Node version you want to update to? how long do your dependencies take to be up to date with the Node version changes?

As a thumb rule, the smaller the change, the smaller the risk involved. Try to find the minimum time which the above factors allow you (do note there might be others) and use it as a starting point.

Hope that helps


author: Neha Verma
body: Hello [@Erez Maadani](/t5/user/viewprofilepage/user-id/5018344) Yes, I tried upgrading my node version. And moving my node version 14 worked for me. I just want to know when is the time to upgrade the node version. like in a regular manner.


author: Neha Verma
body: Hi [@Erez Maadani](/t5/user/viewprofilepage/user-id/5018344), newer image means updating the node version in the docker file?


author: Erez Maadani
body: Hi [@Neha Verma](/t5/user/viewprofilepage/user-id/5202954)

Try using a newer image.

According to NodeJs's docker repo, last 12 tag was updated a year ago and is based on debian 9.


Tags: bitbucket-cloud

bitbucket-development

bitbucket-pipelines

docker

javascript

node.js