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

image arm32v7/node:13.6-slim not working #1195

Closed
khassel opened this issue Jan 12, 2020 · 11 comments · Fixed by #1198
Closed

image arm32v7/node:13.6-slim not working #1195

khassel opened this issue Jan 12, 2020 · 11 comments · Fixed by #1198

Comments

@khassel
Copy link

khassel commented Jan 12, 2020

Since updating from v13.5 to v13.6 the image arm32v7/node:slim fails starting.

Example: docker run -it arm32v7/node:13.6-slim results in

node: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory
@nschonni
Copy link
Member

Does it occur if you use the non-slim version? If it doesn't, then it's likely related to #1182

@khassel
Copy link
Author

khassel commented Jan 12, 2020

it does not occur in the non-slim version.

@nschonni
Copy link
Member

You'll probably need to apt-get install the needed dependencies or switch to the non-slim version. The PR removed packages that aren't normally shipped on slim images

@khassel
Copy link
Author

khassel commented Jan 12, 2020

I was expecting that a node image can perform a node -v without installing more dependencies, but this fails:

pi@pi4:~ $ docker run --entrypoint node arm32v7/node:13.6-slim -v
node: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory

@nschonni
Copy link
Member

Yeah, none of the ARM stuff is tested as part of this repo, just cross-built as part of the Official Images repo setup. @tianon does the BATS tests get run as part of that CI?

@khassel
Copy link
Author

khassel commented Jan 13, 2020

The package libatomic1 is missing. So adding it in this line and preventing it from removing with && apt-mark hold libatomic1 \ before apt-get purge solves the problem. The image has still 143 MB after this fix.

@LaurentGoderre
Copy link
Member

@khassel these packages are side-effects that shouldn't have been there in the first place.

@tianon
Copy link
Contributor

tianon commented Jan 13, 2020

does the BATS tests get run as part of that CI?

None of our build/test process runs any of the BATS tests from this repository. We have a minimal set of tests (https://github.com/docker-library/official-images/tree/master/test) which we run as part of smoke-testing PRs to https://github.com/docker-library/official-images, but they're too much overhead for us to run on every published artifact (and frankly, for some of those tests the fact that they fail does not necessarily mean the artifact should not be published).

these packages are side-effects that shouldn't have been there in the first place.

I'm not sure that's completely accurate if node -v does not work -- it sounds to me like the published ARM binaries for that Node version are dynamically linked against libatomic.so.1, so it's expected that in order to use them, that library must also be installed (which isn't all that uncommon).

This is why in #1182 (comment) I linked to the potentially more-complicated version which also uses ldd in order to make sure that all the binary dependencies are kept, which would automatically catch this issue. I'd also recommend adding node -v as the final command in that RUN line to help catch this issue (because that would have made this turn into a build failure instead of a runtime failure).

@khassel
Copy link
Author

khassel commented Jan 13, 2020

looks as node v13.6 needs libatomic.so.1, v13.5 does not! So it seems not related to #1182 but a new node dependency?

@nschonni
Copy link
Member

Possibly related nodejs/node#30174

@SimenB
Copy link
Member

SimenB commented Jan 14, 2020

I've opened up #1197 and #1198 to address the two points @tianon brought up

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 a pull request may close this issue.

5 participants