Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade NodeJS to version 16.x LTS and remove deprecated apt-key usage #172

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

kissifrot
Copy link
Contributor

Switch to current LTS version of NodeJS and use keyrings files directly instead of now deprecated apt-key usage

RUN echo "deb https://deb.nodesource.com/node_${NODEJS_VERSION} bullseye main" > /etc/apt/sources.list.d/nodejs.list \
&& apt-key adv --fetch-keys https://deb.nodesource.com/gpgkey/nodesource.gpg.key
ARG NODEJS_VERSION=16.x
RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be simpler :

curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key| gpg --dearmor  > /usr/share/keyrings/nodesource.gpg

I have another question, why did you change the way the package signature is checked?

Copy link
Contributor Author

@kissifrot kissifrot Mar 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will simplify the command, good catch (I followed the way its done by NodeJS scripts)

apt-key will be removed in future distributions versions (see Debian wiki or this article)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, thanks for this Information. I didn't know.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplified commands 🙂

Switch to current LTS version of NodeJS and use keyrings files directly instead of now deprecated apt-key usage
@kissifrot kissifrot force-pushed the upgrade-nodejs-change-keyrings branch from d068893 to 6c7e77c Compare March 3, 2022 17:50
Copy link
Member

@lyrixx lyrixx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@lyrixx lyrixx merged commit 88fdea7 into jolicode:main Mar 4, 2022
@lyrixx
Copy link
Member

lyrixx commented Mar 4, 2022

Thanks

@kissifrot kissifrot deleted the upgrade-nodejs-change-keyrings branch March 5, 2022 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants