danlynn / ember-cli

ember-cli docker image providing a complete development environment
https://hub.docker.com/r/danlynn/ember-cli/
MIT License
100 stars 31 forks source link

Missing packages by docker-compose up #25

Closed GELight closed 5 years ago

GELight commented 5 years ago

Hi,

I found your docker container and try to use it for a little older ember app but I get this error by starting "docker-compose up":

Recreating docker-test-project_server_1 ... done Attaching to docker-test-project_server_1 server_1 | DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: feuerwehr-molsdorf -> ember-ajax -> ember-cli-babel server_1 | DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: feuerwehr-molsdorf -> ember-cli-babel server_1 | server_1 | Missing bower packages: server_1 | Package: font-awesome server_1 | * Specified: ~4.5.0 server_1 | * Installed: (not installed) server_1 | server_1 | Package: bootstrap server_1 | * Specified: ~v4.0.0-alpha.2 server_1 | * Installed: (not installed) server_1 | server_1 | Package: slick-carousel server_1 | * Specified: ^1.6.0 server_1 | * Installed: (not installed) server_1 | server_1 | Runbower installto install missing dependencies. server_1 | server_1 | Missing npm packages: server_1 | Package: ember-cli-sass server_1 | * Specified: ^5.6.0 server_1 | * Installed: (not installed) server_1 | server_1 | Runnpm installto install missing dependencies. server_1 | docker-test-project_server_1 exited with code 1

This is my app: https://github.com/GELight/feuerwehr-molsdorf Here I used the ember-cli 2.13.0 in my package json. I deleted all node_module files and all temp files etc.... Then I startet the docker-compose.yml with these config: `server: image: danlynn/ember-cli:2.13.3-node_6.11 environment: CI: "true" volumes:

I hope you can give me a tipp that I can using your docker container.

Best regards, Mario

danlynn commented 5 years ago

These look like issues specific to your own project.

I’d say that the project may have dependencies where the version numbers are not locked down. So, you may be getting a much newer version of something that doesn’t work well with the older dependencies.

Did you try building a default project with that older ember-cli container to verify that the environment itself is consistent? If that works correctly, then the problem is probably due to loose version constraints in your project code.

$ mkdir ember-cli-2.13.3 $ cd ember-cli-2.13.3 $ docker run --rm -it -v $(pwd):/myapp -p 4200:4200 -p 7020:7020 -p 7357:7357 danlynn/ember-cli:2.13.3 bash

ember init

ember test

ember server

On Sep 30, 2018, at 6:08 PM, Mario Linz notifications@github.com wrote:

Hi,

I found your docker container and try to use it for a little older ember app but I get this error by starting "docker-compose up":

Recreating docker-test-project_server_1 ... done Attaching to docker-test-project_server_1 server_1 | DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: feuerwehr-molsdorf -> ember-ajax -> ember-cli-babel server_1 | DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: feuerwehr-molsdorf -> ember-cli-babel server_1 | server_1 | Missing bower packages: server_1 | Package: font-awesome server_1 | Specified: ~4.5.0 server_1 | Installed: (not installed) server_1 | server_1 | Package: bootstrap server_1 | Specified: ~v4.0.0-alpha.2 server_1 | Installed: (not installed) server_1 | server_1 | Package: slick-carousel server_1 | Specified: ^1.6.0 server_1 | Installed: (not installed) server_1 | server_1 | Runbower installto install missing dependencies. server_1 | server_1 | Missing npm packages: server_1 | Package: ember-cli-sass server_1 | Specified: ^5.6.0 server_1 | Installed: (not installed) server_1 | server_1 | Runnpm installto install missing dependencies. server_1 | docker-test-project_server_1 exited with code 1

This is my app: https://github.com/GELight/feuerwehr-molsdorf https://github.com/GELight/feuerwehr-molsdorf Here I used the ember-cli 2.13.0 in my package json. I deleted all node_module files and all temp files etc.... Then I startet the docker-compose.yml with these config: server: image: danlynn/ember-cli:2.13.3-node_6.11 environment: CI: "true" volumes: - C:\Users\gelig\projects\feuerwehr-molsdorf:/myapp ports: - "4200:4200" - "7020:7020" - "5779:5779"

I hope you can give me a tipp that I can using your docker container.

Best regards, Mario

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/danlynn/ember-cli/issues/25, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA6Ymy1_mUeaaecVZzc7kmlyMPjndAcks5ugUD5gaJpZM4XBLoC.

GELight commented 5 years ago

Hi,

Sorry, for my late answer. I was in a short vacation. Many thanks for your answer and your ideas. I will try to test it.

Best regards, Mario

GELight commented 5 years ago

Hi danlynn,

Yesterday I could test your last tipp on linux such as windows 10. In both systems the standard ember app runs without problems. So far so good.

After this I tried to use my old project. This message will shown by "ember serve":

Missing bower packages: server_1 | Package: font-awesome server_1 | * Specified: ~4.5.0 server_1 | * Installed: (not installed) server_1 | server_1 | Package: bootstrap server_1 | * Specified: ~v4.0.0-alpha.2 server_1 | * Installed: (not installed) server_1 | server_1 | Package: slick-carousel server_1 | * Specified: ^1.6.0 server_1 | * Installed: (not installed) server_1 | server_1 | Runbower installto install missing dependencies.

If I try to execute "bower install" an error occurred with permission problems. Any ideas for this problem?

Best regards, Mario

danlynn commented 5 years ago

Your instincts were correct. You do need to run bower install to pull in the dependencies specific to your project. However, since docker runs as root, you need to run bower install as:

bower --allow-root install

On Oct 18, 2018, at 7:02 AM, Mario Linz notifications@github.com wrote:

Hi danlynn,

Yesterday I could test your last tipp on linux such as windows 10. In both systems the standard ember app runs without problems. So far so good.

After this I tried to use my old project. This message will shown by "ember serve":

Missing bower packages: server_1 | Package: font-awesome server_1 | Specified: ~4.5.0 server_1 | Installed: (not installed) server_1 | server_1 | Package: bootstrap server_1 | Specified: ~v4.0.0-alpha.2 server_1 | Installed: (not installed) server_1 | server_1 | Package: slick-carousel server_1 | Specified: ^1.6.0 server_1 | Installed: (not installed) server_1 | server_1 | Runbower installto install missing dependencies.

If I try to execute "bower install" an error occurred with permission problems. Any ideas for this problem?

Best regards, Mario

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/danlynn/ember-cli/issues/25#issuecomment-430966906, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA6Yn0-aT00kt9uhPvnwTPl3x5SJxCeks5umF-9gaJpZM4XBLoC.

GELight commented 5 years ago

Now updated my project to newer versions and so the app is running in your ember-cli:3.5.0-node_10.12 container. I starts with this command:

docker run --rm -ti -v C:\Users\.......\feuerwehr-molsdorf-de:/myapp -p 4200:4200 -p 7020:7020 -p 7357:7357 danlynn/ember-cli:3.5.0-node_10.12 bash

My problem or/and question is: Each changes on files inside my project needs to stop and restart my ember app itself inside the container. Is there a possibillity to see my changes by save? Also a page refresh by STRG + r ( Windows ) shows me my changes outside the container ( http://localhost:4200 )

Best regards, Mario

danlynn commented 5 years ago

Once you start the bash shell in the container and run ember server, it should pick up any changes as soon as the files are saved on your desktop and recompile them and trigger the browser to refresh via the live reload. You have the 4200 and 7020 ports exposed correctly to be able to access the server from your desktop browser and for the live reload to work. When files are saved on your desktop, they should be picked up by the ember server by noticing that the modify date has been updated. The shared volume that you setup should allow that to work fine.

I have noticed a long time ago, that sometimes shared volumes would not correctly update the modify date on files and ember server could not tell that they were updated. I think this was on early versions of docker-machine when running with VirtualBox. If I were you, I’d try checking the modify date on a file from your docker bash shell after you have saved a change on your desktop to verify that the dates are being updated properly. If they are not being updated then you may consider using a different hypervisor virtualization app (VMware, VirtualBox, etc.). Or perhaps there might be some obscure setting in the hypervisor that would make sure that updates are reflected in the shared volumes.

My solution way, way back was to write a little program that ran in the background and then did a docker exec touch of every file as it was modified. But, that is probably way beyond the scope of anything you would want to get into.

Good Luck!

On Oct 28, 2018, at 12:28 PM, Mario Linz notifications@github.com wrote:

Now updated my project to newer versions and so the app is running in your ember-cli:3.5.0-node_10.12 container. I starts with this command:

docker run --rm -ti -v C:\Users.......\feuerwehr-molsdorf-de:/myapp -p 4200:4200 -p 7020:7020 -p 7357:7357 danlynn/ember-cli:3.5.0-node_10.12 bash My problem or/and question is: Each changes on files inside my project needs to stop and restart my ember app itself inside the container. Is there a possibillity to see my changes by save? Also a page refresh by STRG + r ( Windows ) shows me my changes outside the container ( http://localhost:4200 http://localhost:4200/ )

Best regards, Mario

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/danlynn/ember-cli/issues/25#issuecomment-433720308, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA6YpIo27Eue0Wb8UK8BbycgtWBvOLjks5updsegaJpZM4XBLoC.