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

fix: keep dynamically linked files in slim images #1198

Merged
merged 2 commits into from
Feb 19, 2020

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Jan 14, 2020

Should be merged after #1197. I kept them separate as I don't know how to test that this works for arm.

Fixes #1195

@SimenB SimenB requested a review from a team January 14, 2020 09:24
@tianon
Copy link
Contributor

tianon commented Jan 14, 2020

I tested this on arm32v7, and found I had to add a couple things before it worked -- I had to add libatomic1 to the list of things explicitly installed in the node layer, then I had to add the savedAptMark behavior we'd discussed previously in the yarn layer, ala:

RUN set -ex \
  && savedAptMark="$(apt-mark showmanual)" \
  && apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr --no-install-recommends \
# ...
  && apt-mark auto '.*' > /dev/null \
  && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; } \
  && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
  # smoke test
  && yarn --version

@Kosta-Github
Copy link

can this be somehow resolved, since right now both 13.x and 12.x images are not working:

$ docker run --rm node:13-slim --version
node: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory

and

$ docker run --rm node:12-slim --version
node: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory

The last working one seems to be 12.15-slim:

 $ docker run --rm node:12.15-slim --version
v12.15.0

@SimenB SimenB force-pushed the keep-dynamically-linked-files branch from 9ba4ff3 to 71849fa Compare February 13, 2020 21:46
@SimenB
Copy link
Member Author

SimenB commented Feb 13, 2020

I've rebased this now.

@tianon thanks for testing!

I added what I think is correct as a second commit now. Does that look right? Could you test again?

10/buster-slim/Dockerfile Outdated Show resolved Hide resolved
@SimenB SimenB force-pushed the keep-dynamically-linked-files branch from cac3f7b to 2caaf1a Compare February 13, 2020 22:17
@tianon
Copy link
Contributor

tianon commented Feb 14, 2020

Tested 13/buster-slim on arm32v7 and it was successful! 👍

@SimenB SimenB changed the title chore: try to keep dynamically linked files fix: keep dynamically linked files in slim images Feb 14, 2020
@SimenB
Copy link
Member Author

SimenB commented Feb 14, 2020

Wonderful, thanks for checking!

@nodejs/docker PTAL 🙂

@SimenB SimenB merged commit e76dc47 into nodejs:master Feb 19, 2020
@SimenB SimenB deleted the keep-dynamically-linked-files branch February 19, 2020 15:09
@nschonni
Copy link
Member

Looks like the Travis job failed on the deploy if someone can try and reset it https://travis-ci.com/nodejs/docker-node/jobs/288915013

@SimenB
Copy link
Member Author

SimenB commented Feb 19, 2020

Yeah, failed when gh had issues earlier. I was unable to open a manual pr as well. I'll restart it 🙂

@nodejs-github-bot
Copy link
Collaborator

Created PR to the official-images repo (docker-library/official-images#7493). See https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what if you are wondering when it will be available on the Docker Hub.

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.

image arm32v7/node:13.6-slim not working
6 participants