ember-cli icon indicating copy to clipboard operation
ember-cli copied to clipboard

node broken on 2.17.1?

Open basz opened this issue 7 years ago • 8 comments

node broken?

docker run --env CI=true --rm -ti -v $(pwd):/myapp -p 4201:4201 -p 49155:49155 -p 7357:7357 danlynn/ember-cli:2.17.1 bash
root@8f6ef0b0fac3:/myapp# node
node: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: invalid ELF header

I'm on OSX, 2.16.2 runs fine

basz avatar Mar 19 '18 12:03 basz

Should be fine. I just deleted and re-pulled from docker hub and everything works fine. Because it is docker, your machine's OS shouldn't matter at all.

Try deleting and running your docker command again:

$ docker rmi danlynn/ember-cli:2.17.1
$ docker run --env CI=true --rm -ti -v $(pwd):/myapp -p 4201:4201 -p 49155:49155 -p 7357:7357 danlynn/ember-cli:2.17.1 bash

...perhaps something else corrupted the image. If you run docker commands without --rm with docker compose then it persists any changes into the image on your machine. Also, you can get into trouble with docker rmi -f which may force intermediate images to be pulled out from under other images that require them.

Usually, in cases like this, deleting the specific image:tag and re-pulling clears everything up.

Also note that I lock down all the dependency versions in these images so that even if you rebuild the image yourself later, you should still be alright.

danlynn avatar Mar 19 '18 15:03 danlynn

@basz what are you using CI=true for?

jrock2004 avatar Apr 24 '18 14:04 jrock2004

I'm not (moved away from this), but if I remember correctly this container is meant for testing environments. Should be in the docs.

basz avatar Apr 24 '18 14:04 basz

You mean you moved away from Docker or just another image? Also are you talking about the docker docs?

jrock2004 avatar Apr 24 '18 14:04 jrock2004

Still using docker, not for ember development (way too slow (on osx atleast))

I meant these docs: https://github.com/danlynn/ember-cli

basz avatar Apr 24 '18 14:04 basz

@basz I bet its because you were mounting node_modules,tmp. In my docker-compose file I had to tell docker to not do that as it just caused horrible pain. If you want more info send me a message and we can chat

jrock2004 avatar Apr 24 '18 14:04 jrock2004

Probably yes. I was just experimenting.

However the backend also runs in docker containers on my laptop and that whole stack becomes just too slow. It now takes 5-10 seconds before a reload is complete. I therefore decided to hold dockerizing my ember app off for now. Thanks

basz avatar Apr 27 '18 21:04 basz

Yeah, the issue is around node_modules and or bower_components trying to stay in sync. There is a way to tell docker to not keep those folders in sync with host. When you do that, things speed up

jrock2004 avatar Apr 28 '18 00:04 jrock2004