Skip to content

Alpine Linux / Docker Build #75

Closed
Closed

Description

@tracker1

Would really be appreciated if some help could be rendered to getting an alpine image for iojs passing the test suite.

If there could be two build images, one for just node, and another with everything needed for node_gyp and nan to run.

Also, would be nice to see tests for building common binary modules (sqlite3, expat and a few others).

Activity

  1. jbergstroem commented on Apr 15, 2015

    @jbergstroem
    Member

    @tracker1 I think one challenge will be fully supporting musl as a libc replacement. I'm not against it but have very little knowledge about it. It doesn't look like its in too bad a shape. I'm keen on setting up a system based on musl, so I might give this a go down the road, but don't count on me for the moment.

  2. tracker1 commented on Apr 15, 2015

    @tracker1
    Author

    @jbergstroem understandable... :-) Really wish I had more time (and a more intimate working relationship with C/C++).

  3. springmeyer commented on Apr 15, 2015

    @springmeyer

    Also, would be nice to see tests for building common binary modules (sqlite3, expat and a few others).

    As the maintainer of node-sqlite3, 👍

    I'm keen on setting up a system based on musl, so I might give this a go down the road, but don't count on me for the moment.

    Same here. I'm also interested in musl.

  4. mhart commented on Apr 24, 2015

    @mhart

    The failures in the tests (there are only two) are due to assumptions in the tests themselves. One being that the platform has glibc (which Alpine isn't), the other being that the ps command supports the -p flag (which Alpine doesn't).

    You can read more here: nodejs/docker-iojs#44 (comment)

  5. Starefossen commented on Jan 10, 2016

    @Starefossen
    Member

    I am putting this on the agenda for #300

  6. jbergstroem commented on Jan 10, 2016

    @jbergstroem
    Member

    I don't think anyone objects to get this part of the ci, but work needs to be done. Lets get an outline going for whats required - feel free to add:

    • we lack a vm provider that can run alpine (unless we automate docker stuff)
    • we lack ansible scripts to set a host up
  7. self-assigned this
    on Feb 2, 2016
  8. Starefossen commented on Feb 2, 2016

    @Starefossen
    Member

    Regarding version of Alpine linux it looks like the Docker Library guys are using alpine:3.3 for some of their official images on Docker Hub.

    https://github.com/docker-library/python/blob/master/3.5/alpine/Dockerfile#L1
    https://github.com/docker-library/redis/blob/master/3.0/alpine/Dockerfile#L1

  9. jbergstroem commented on Feb 2, 2016

    @jbergstroem
    Member

    @Starefossen how often is stable updated? How does that affect toolchain, etc? (thinking if they have a LTS mindset)

  10. Starefossen commented on Feb 3, 2016

    @Starefossen
    Member

    I had a chat with one of the Alpine Linux maintainers today. This is what they told me:

    • They have Node.js in main repository
    • Releases are supported for 2 years since initial release with security backports or critical bugfixes
    • edge is our rolling release, where latest releases land
    • official alpine image pulls latest stable release by default
    • breaking changes are usually unrelated to high level stuff like Node.js
    • suggests running tests for maintenance releases on latest stable, and development on edge
  11. mhart commented on Feb 3, 2016

    @mhart

    @Starefossen some important things to note about the Node.js package in the aports repository are:

    • They compile with shared zlib (--shared-zlib)
    • They compile with shared libuv (--shared-libuv)
    • They compile with shared openssl (--shared-openssl) (this recently caused a compatibility issue)
    • They compile without snapshot (--without-snapshot)
    • I'm not sure how to get Node.js 5.x if you're not on edge?

    These may not be an issue but they're worth being aware of. They've certainly been a lot better at keeping up to date with releases since 4.x

    (latest build file is here: http://git.alpinelinux.org/cgit/aports/tree/main/nodejs/APKBUILD?id=18fd7609f0ec2df89c873e788880119a703496a1)

  12. jbergstroem commented on Feb 3, 2016

    @jbergstroem
    Member

    @mhart the intention is to build node, so not being on edge shouldn't be a problem. Meeting the dependencies (if using shared libraries) might though.

  13. MylesBorins commented on Feb 3, 2016

    @MylesBorins
    Contributor

    Having just done the ssl update I know there are 4 floating patch's on top of the release

  14. 28 remaining items

  15. rvagg commented on Jul 5, 2016

    @rvagg
    Member

    I believe the question is about shipping musl binaries? I'm hesitant about adding musl binaries to nodejs.org for the following reasons:

    • We're going to get calls for adding support for older versions of musl than we're building against—we need a clear understanding about what is supported out there by distros so we can answer with "that version isn't used by any distro version that is currently supported" like we do with libc (we build on CentOS5 because EL5 is the oldest thing that's still supported, so we get no complaints).
    • We're going to be asked for more architectures and we have no way to deal with that as far as I know. We can use Docker to build 64-bit musl on Apline 3.4 but what about 32-bit, what about arm? what about arm64?

    It's a Pandora's Box that we have to be sure we want to open before we go ahead with this. Right now it's easy and obvious: our binaries only support libc.

    Let's get this on the Build WG agenda and see if anything comes out of that.

  16. shouze commented on Jul 5, 2016

    @shouze

    @rvagg for sure it need to be maintained... to me node docker alpine variants are sufficient. I'm not convinced that shipping musl compatible binaries (outside of docker containers) deserves many use cases. In general we talk about people that are used to compile node themself no?

  17. rvagg commented on Jul 5, 2016

    @rvagg
    Member

    I think the proposal here is for us to ship musl binaries on nodejs.org so the docker-node folks don't need to build it on image when shipping to Docker Hub. If that's incorrect then someone please clarify what the ask here is now.

  18. bnoordhuis commented on Jul 5, 2016

    @bnoordhuis
    Member

    Security angle: statically linking in musl means we're obligated to track it for CVEs and make the proper announcements and releases when vulnerabilities are found. IOW, it's more work.

  19. Starefossen commented on Jul 5, 2016

    @Starefossen
    Member

    I think the proposal here is for us to ship musl binaries on nodejs.org so the docker-node folks don't need to build it on image when shipping to Docker Hub. If that's incorrect then someone please clarify what the ask here is now.

    That is correct, Rod!

  20. shouze commented on Jul 5, 2016

    @shouze

    So... musl could be not statically linked then docker-node folks will need to build an image that include node compilation and on security angle it will benefit from docker hub security scanning feature.

    Of course If I had nodejs binary ready to download for my docker container it would be cool, so I'm not against this proposition, just not convinced it worth it regarding the amount of energy to spend.

  21. LaurentGoderre commented on Oct 26, 2016

    @LaurentGoderre
    Member

    Couldn't I make the case that docker and Alpine are a wildly adopted platform and having a binary targeting those is good for Node. Couldn't you justify this one in particular and avoid the scfope creep since Docker has a consistent architecture.

  22. LaurentGoderre commented on Jan 19, 2017

    @LaurentGoderre
    Member

    I would like to bump this. Since we included an alpine variant to the docker project, we received a lot of questions about the alpine variant specifically. It's unfortunate that we don't have stats about specific docker tag downloads but it's possible that alpine will become on of the most used platforms for Node, if it isn't already.

  23. Trott commented on May 23, 2018

    @Trott
    Member

    Is this resolved? I haven't read all the details, but I know that we have docker and alpine in CI now and I see that this issue has not received much in the way of comments lately.

  24. SimenB commented on May 23, 2018

    @SimenB
    Member

    I'm not sure what this issue is tracking, tbh. I'd still love alpine binaries as part the regular release, but that might not be tracked here?

  25. Vanuan commented on May 23, 2018

    @Vanuan

    This was the first issue mentioning Docker/Alpine use case specifically asking to provide help with running test suite in alpine.
    Several follow up issues were created since then.
    So this apparently was re-purposed as an umbrella issue for all other issues mentioning Alpine.

    Now, that Alpine variant is in CI and included into official docker library: https://github.com/docker-library/official-images/blob/master/library/node
    the only missing part is providing node binary linked against musl (at least for x86_64) here:
    https://nodejs.org/dist/

  26. maclover7 commented on Jun 19, 2018

    @maclover7
    Contributor

    Alpine (both 36 and 37) is being used in CI, which I believe closes this issue? Please reopen if I'm mistaken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions