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

Containerized binary #210

Closed
jareware opened this issue Jan 10, 2015 · 16 comments
Closed

Containerized binary #210

jareware opened this issue Jan 10, 2015 · 16 comments

Comments

@jareware
Copy link

I would like to run flow in a Docker container. However:

$ docker run -it ubuntu
root@104d066a88b9:/# apt-get install -y unzip wget
root@104d066a88b9:/# wget http://flowtype.org/downloads/flow-linux64-latest.zip
root@104d066a88b9:/# unzip flow-linux64-latest.zip
root@104d066a88b9:/# ./flow/flow
./flow/flow: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory
root@104d066a88b9:/# apt-get install -y libelf-dev
root@104d066a88b9:/# ./flow/flow
Fatal error: exception Not_found
root@104d066a88b9:/# uname -a
Linux 104d066a88b9 3.16.7-tinycore64 #1 SMP Tue Dec 16 23:03:39 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

I've also tried installing through opam and compiling flow from source, always with the same result.

Install works fine on a standard Ubuntu box.

Ideas?

@maddyblue
Copy link

Same here with a debian:jessie docker container.

@maddyblue
Copy link

Some debug information:

% OCAMLRUNPARAM=b flow
Fatal error: exception Not_found
Raised at file "map.ml", line 117, characters 16-25
Called from file "str.ml", line 253, characters 6-29

@maddyblue
Copy link

Found a fix, apparently you need to set USER to something:

http://stackoverflow.com/a/27427352/864236

@jareware
Copy link
Author

That works, well spotted!

@gabelevi
Copy link
Contributor

Should probably fix Flow and Hack to work without USER being set. Thanks for posting the workaround, @mjibson!

@ghost
Copy link

ghost commented Aug 5, 2015

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.

@gabelevi
Copy link
Contributor

gabelevi commented Aug 5, 2015

Just tried to repro this and it seems fixed. Closing out.

@gabelevi gabelevi closed this as completed Aug 5, 2015
@touchtech-docker-machine

This still happens for me in a Docker container using the flow-bin npm package. The command is "flow check".

/opt/buildAgent/work/3c70a0ec877e6008/node_modules/flow-bin/vendor/flow: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory

@janoskk
Copy link
Contributor

janoskk commented Mar 16, 2016

@touchtech-docker-machine it was the same for me. To solve it I installed libelf1 on debian jessie with

 sudo apt-get install libelf1

It's strange that there is no check and warning message during the npm install of flow-bin...

@ababich
Copy link

ababich commented Aug 31, 2016

If your image is from node:latest (which is debian:jessie under the hood)
you need a little bit more:
apt-get update -qq
apt-get install -qy libelf1

@sean-clayton
Copy link

@ababich's Fix worked wonderfully for me.

@akheron
Copy link

akheron commented Jan 20, 2017

Installing libelf1 in the container worked for me up to v0.37.4 but doesn't work anymore on v0.38.0.

@kfigiela
Copy link

kfigiela commented Feb 16, 2017

This worked for me, v0.39, debian jessie based container

@akheron
Copy link

akheron commented Mar 2, 2017

Seems to work again.

@Dakuan
Copy link

Dakuan commented Aug 11, 2017

still having this issue on circleCI 2 :(

@zacacollier
Copy link

@Dakuan I was having this issue on CircleCI 2 as well

after updating to flow-bin@0.46.0 and rerunning flow check ., I had a couple errors

[2017-10-06 16:32:49] File node_modules/node-uuid/lib/sha1-browser.js is malformed
[2017-10-06 16:32:50] File node_modules/weinre/web/client/nls/English.lproj/localizedStrings.js is malformed

which I fixed by updating my .flowconfig [ignore]s:

.*/node_modules/node-uuid/lib/.*
.*/node_modules/weinre/web/client/nls/.*

#3870 has some more details. Hope that helps!

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

No branches or pull requests