Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Recently Pipeline apt-get update Fails

Neha Verma April 24, 2023

Here is my Pipeline file


Screenshot 2023-04-24 at 1.23.15 PM.png


This is the error I am getting 

 

Screenshot 2023-04-24 at 1.22.29 PM.png

6 answers

1 accepted

1 vote
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 25, 2023

Hi @Neha Verma,

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:

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

Neha Verma April 26, 2023

Hi @Theodora Boudale ,

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

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 26, 2023

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

Neha Verma April 26, 2023

Thank you for your help. :) @Theodora Boudale 

Like Theodora Boudale likes this
1 vote
Erez Maadani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 24, 2023

Hi @Neha Verma 

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.

Neha Verma April 26, 2023

Hi @Erez Maadani ,

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

Neha Verma April 26, 2023

Thank you for your help! :) @Erez Maadani 

0 votes
Erez Maadani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 24, 2023

Hi @Neha Verma 

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

0 votes
Neha Verma April 24, 2023

Hello @Erez Maadani 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.

0 votes
Neha Verma April 24, 2023

Hi @Erez Maadani, newer image means updating the node version in the docker file?

0 votes
Erez Maadani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 24, 2023

Hi @Neha Verma 

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events