Go to the original repository for the stable versions. This one is temporarily hosting beta versions of ember-cli v2.x.y, at least until the stable version comes out and the original repo is updated.
Supported tags and respective
This image was originally based on: geoffreyd/ember-cli (hat tip)
This image contains everything you need to have a working development environment for ember-cli. The container's working dir is /myapp so that you can setup a volume mapping your project dir to /myapp in the container.
ember-cli v2.3.0 + node 5.5.0 + npm 3.3.12 + bower 1.7.2 + phantomjs 2.1.3 + watchman 4.3.0
How to use - Easy Way
Clone the ember-cli-docker-template project from github which already has everything all setup to start using this image. It also conveniently sets up aliases for the ember, bower, and npm commands so that you don't need to type
docker-compose run --rm <command>. Instead, you can simply type the command just as if it was running locally instead of in a docker container.
How to use - Hard Way
The harder way is to manually setup a project to use this container via docker-compose.
Create new project dir and add a docker-compose.yml file similar to the following:
ember: &defaults image: danlynn/ember-cli:1.13.13 volumes: - .:/myapp npm: <<: *defaults entrypoint: ['/usr/local/bin/npm'] bower: <<: *defaults entrypoint: ['/usr/local/bin/bower', '--allow-root'] server: <<: *defaults command: server --watcher polling ports: - "4200:4200" - "35729:35729"
Create an ember app in the current dir:
docker-compose run --rm ember init
Start the ember server:
$ docker-compose up
This launches the ember-cli server on port 4200 in the docker container. As you make changes to the ember webapp files, they will automagically be detected and the associated files will be recompiled and the browser will auto-reload showing the changes.
Note that if you get an error something like
server_1 | Error: A non-recoverable condition has triggered. Watchman needs your help! server_1 | The triggering condition was at timestamp=1450119416: inotify-add-watch(/myapp/node_modules/ember-cli/node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/readable-stream/doc) -> The user limit on the total number of inotify watches was reached; increase the fs.inotify.max_user_watches sysctl server_1 | All requests will continue to fail with this message until you resolve server_1 | the underlying problem. You will find more information on fixing this at server_1 | https://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch
Then watchman is running out of resources trying to track all the files in a large ember app. To increase the
fs.inotify.max_user_watchescount to something that is more appropriate for an ember app, stop your docker-compose server by hitting ctrl-c (or
docker-compose stop serverif necessary) then execute the following command:
$ docker run --rm --privileged --entrypoint sysctl danlynn/ember-cli:1.13.13 -w fs.inotify.max_user_watches=524288
Note that this will affect all containers that run on the current docker-machine from this point forward because
fs.inotify.max_user_watchesis a system-wide setting. This shouldn't be a big deal however, so go ahead and give it a try. Then start the docker-compose service again with
$ docker-compose up
Launch the ember webapp:
You will need to first determine the IP of the docker container:
$ docker-machine ip -or- $ boot2docker ip 192.168.59.103
Next open that ip address in your browser on port 4200:
The ember, bower, and npm commands can be executed in the container to effect changes to your local project dir as follows. You basically put a "docker-compose run --rm" in front of any of the 3 commands and pass the normal command options as usual.
docker-compose run --rm npm install docker-compose run --rm bower install bootstrap docker-compose run --rm ember generate model user