Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Add Docker files for building supported binaries #1996

Closed
3 tasks
nschonni opened this issue Jun 2, 2017 · 10 comments
Closed
3 tasks

Add Docker files for building supported binaries #1996

nschonni opened this issue Jun 2, 2017 · 10 comments

Comments

@nschonni
Copy link
Contributor

nschonni commented Jun 2, 2017

In order to make producing binaries that aren't built by Travis or AppVeyor we could add Dockerfiles for platforms that we support

  • Node-alpine
  • CentOS
  • Debian

Alternately a dynamic approach like https://github.com/lox/node-sass-build-alpine-binaries could be used

@xzyfer
Copy link
Contributor

xzyfer commented Jun 2, 2017 via email

@nschonni
Copy link
Contributor Author

@LaurentGoderre do you think it would make sense to do something like the Node-Docker repo?

@LaurentGoderre
Copy link
Contributor

I would do a Docker build for all the variants if possible. Unfortunately it's not possible or easy to support Alpine at this time because Node doesn't report the compiler so it's more difficult to target MUSL

@saper
Copy link
Member

saper commented Jun 14, 2017

@LaurentGoderre what kind of support would be needed from node to make it easier to get musl builds done? I think I have proposed something similar for Windows nodejs/node#6045 but for the unixlikes it might be more complicated.

@LaurentGoderre
Copy link
Contributor

LaurentGoderre commented Jun 14, 2017

I would be nice from a Docker perspective to have Node officially support alpine as a platform (it's unfortunate we can't get per tags metrics for the Docker node images). Then it would probably be adding a property to the Process object that reports the compiler used to Compile V8. By default it would be glibc but for alpine it would be musl.

Ex:

console.log(Process.compiler) // musl

@LaurentGoderre
Copy link
Contributor

I have had this in my head for weeks but haven't had the time to start the intimidating step to propose it to the community.

@nschonni
Copy link
Contributor Author

@LaurentGoderre the linked repo at the top is how we currently do it. We know we're building for Musl/Alpine, and the loader has some sniffing to check if it should load it

if (contents.indexOf('libc.musl-x86_64.so.1') !== -1) {

💯 that an officially supported way would be better 😄

@saper
Copy link
Member

saper commented Oct 24, 2019

I have posted an update to the script https://github.com/saper/node-sass-build-alpine-binaries/tree/updates-2019

There is one thing that worries me though - is the g++ version we are installing using apk identical with what was used to build the node binary?

@xzyfer
Copy link
Contributor

xzyfer commented Oct 24, 2019 via email

@saper
Copy link
Member

saper commented Oct 24, 2019

I remember some mysterious alpine crashes that got fixed with alpine linux update.

I just checked 6, 8, 10, 12 and 13 images and libstdc++ versions do match with what we have in our build images, so we should be on a safe side now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants