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

chore: move to alpine 3.21 #4067

Merged
merged 7 commits into from
Mar 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG image=zwave-js-ui
ARG NODE_VERSION=20.19.0
ARG ALPINE_VERSION=3.18.4
ARG ALPINE_VERSION=3.21
Copy link
Contributor

Choose a reason for hiding this comment

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

The only downside now is you're no longer pinning Alpine to a specific patch release. So subsequent builds may automatically pick up a new version.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can add .0

Copy link
Contributor

Choose a reason for hiding this comment

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

3.21.3 is current version.

Copy link
Contributor

Choose a reason for hiding this comment

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

I just noticed I use 3.21 myself in my own containers, so don't change it if you don't want to.

Copy link
Member Author

Choose a reason for hiding this comment

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

seems node 3.21.0 doesn't exists

Copy link
Contributor

@kpine kpine Mar 20, 2025

Choose a reason for hiding this comment

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

The Alpine image does: https://hub.docker.com/layers/library/alpine/3.21.0/images/sha256-fcc4c908760c4f561a5199f2e53576063b1b8eeaa0c41e6432d705aab4389753

But there's no reason to use .0 when .3 is available.

The node images don't support patch revisions.

I'm confused as how installing nodejs in Alpine results in a bigger image than copying from the node image. What's missing? Are the missing files needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm confused as how installing nodejs in Alpine results in a bigger image than copying from the node image. What's missing? Are the missing files needed?

Node images comes with yarn corepack and other things that I don't need on mine


FROM node:${NODE_VERSION}-alpine AS node
FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} AS node
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't really need this anymore the nodejs package with 3.21 is Node 22. But if it helps you manage Node versions more easily, sure.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah I kept it for this, also in this way the image dimension is smaller :)


FROM alpine:${ALPINE_VERSION} AS base

Expand All @@ -29,8 +29,7 @@ RUN \
jq \
build-base \
linux-headers \
python3-dev \
npm=9.6.6-r0
python3-dev
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, I don't think re-building serialport is necessary anymore, but I haven't tested it yet (I wouldn't make that change here).

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm a bit scared sincerly to remove that line 😆


COPY . .

Expand Down
Loading