This article was last edited over 3 years ago. Information here may no longer be accurate. Please proceed with caution, and feel free to contact me.
I can finally use Ember with Docker without a horrible performance hit! Thank you docker-sync and Unison!
For the sake of this article, I am using the Ember super-rentals demo app for demonstration.
I am assuming you have already installed Docker and are comfortable installing ruby gems on your system.
gem install docker-sync
Clone the super-rentals app.
git clone https://github.com/ember-learn/super-rentals
docker-sync.yml file in the root of
version: 2 syncs: super-rentals-sync: src: '.'
docker-compose.yml file in the root of
version: '2' services: super-rentals: image: 'node:8.9.1' command: '/bin/bash' volumes: - super-rentals-sync:/app:nocopy volumes: super-rentals-sync: external: true
Run our container with the synced volume.
docker-compose \ run \ --rm \ --name=super-rentals \ -p 4200:4200 \ -p 7020:7020 \ -w /app \ super-rentals
ember-cli in the container.
npm install -g ember-cli
Install node modules.
Run the ember server.
ember s --live-reload-port 7020
You should now be able to access your app at
http://localhost:4200 and update it like normal!
You can stop the
docker-sync container like so.
At this point you should be able to use Docker and Ember like normal. You can create your own Docker image and customize these steps as you see fit.