I know that officially distributed node binaries don't use system icu (as it's not guaranteed) but things could be seen another way with containers.
Why? especially to avoid full-icu install pain (it's been a while that it's not working well and no real solution still emerging).
In depth, I suggest to add the following lines when compiling node (here the alpine variant) until things get fixed into full-icu package:
Can the icu-libs packaged be added to .build-deps and then later removed or is it still required afterwards for icu support in node?
Actually, nevermind, it is required. I was confusing it with icu-dev.
So we could technically do this for the Alpine image since we're building node from source, but at some point we'd like to have (via the build group) a musl/alpine binary that we can install similarly to what we do for the other images. This change would complicate that a bit since the musl/alpine binary would presumably not be built with icu. Not having to build from source would cut down on the build time significantly and would speed up releases to the docker hub. I guess a musl/alpine binary with baked in icu support would work if we added icu-libs to the docker image.
I guess a musl/alpine binary with baked in icu support would work if we added icu-libs to the docker image.
I guess it would work but yes icu lib is not statically linked this way. Do you think we could change that into a statically linked lib instead is it probably what --with-intl=full-icu do when we compile node?
Any reason why this is stalled. We have an internationalized app and would love to get official node images with full icu support
@r-tock ATM the best thing is to build you own containerised docker node like I've done here https://github.com/rezzza/docker-node/blob/master/vendor/karibbu/Dockerfile. BTW the real issue is more on this issue as we're using yarn and this package bring a solution to download full icu data through dependency management: https://github.com/unicode-org/full-icu-npm/issues/9
Closing this one as full-icu can now be installed with npm AND yarn since from now. see https://github.com/unicode-org/full-icu-npm/issues/9 & last today merge https://github.com/unicode-org/full-icu-npm/pull/14
I also struggled with incorrect number formatting inside a Docker container, but then found a solution – thanks @shouze for pointing to full-icu package!
Here are the details of my mini-investigation: https://github.com/i18next/i18next/issues/853#issuecomment-382299814. Hope they help those who ended up in this issue from search.
Switching from Node 10 to node 14 fixed it for me.