Public | Automated Build

Last pushed: 24 days ago
Short Description
Docker for ember-cli with supporting tooling
Full Description


Docker and tooling for using ember-cli in a reproducable way.


Our ember-cli builds have not been as reproducable as we'd have wanted
them to be. Tooling can differ across machines because the operating
systems are different, therefore yielding different versions of
nodejs/iojs or different versions of sass bindings. The sass bindings
are what pushed us over the edge to try out Dockers for sharing our
build environment.

With the advent of user-namespaces in Docker, mounting volumes with
the right privileges has become
transparant. (see
for some basic info)

The arguments you need to pass to the Docker run command for it to be
useful are too cumbersome, hence we've created scripts to help you


We have 4 commands, each for a different use-case. Run them at the
root of your project.


ed is your default friend. ed helps you install npm & bower
dependencies, install new ember dependencies and run any other
non-interactive ember command.

# Install a dependency
ed ember install ember-cli-coffeescript
# Install all current node modules
ed npm install
# Install bower components
ed bower install


eds launches the ember server for you.

# No nonsense ember server
# Proxying to your localhost (note it's been renamed from localhost to host)
eds --proxy http://host:8080


edi is the interactive version of ed. It can ask you questions
and you can provide interactive answers.

# Generate a route
edi ember generate route epic-win
# Release a new minor version
edi ember release --minor


edl is your friend when developing addons. It provides a replacement for npm link and npm unlink that works in docker-ember.

# Create a global symlink of your addon
cd your-ember-addon
# Use that addon in another project
cd your-ember-project
edl your-ember-addon
# Remove the global symlink of your addon
cd your-ember-addon
edl -u

Note: edl assumes edi is available on your PATH


Assuming you have docker set up correctly, simply clone this repository and add the bin folder to your path.

git clone
echo "export PATH=\$PATH:`pwd`/docker-ember/bin" >> ~/.bashrc
source ~/.bashrc

By default ed* commands run as root in the docker container, this means newly created files will be owned as root as well. To avoid this you can use user namespaces to map the container's root user to your own user. This requires some minimal configuration.

Assuming systemd and a username my-user the following steps should suffice:

1. Create the correct mapping in /etc/subuid and /etc/subgid:

MY_USER_UID=`grep my-user  /etc/passwd | awk -F':' '{ print $3 }'`
MY_USER_GUID=`grep my-user  /etc/passwd | awk -F':' '{ print $4 }'`
echo "ns1:$MY_USER_UID:65536"| sudo tee -a /etc/subuid
echo "ns1:$MY_USER_GUID:65536"| sudo tee -a /etc/subgid

2. Adjust ExecStart of docker daemon to include --userns-remap=ns1.

For systemd you can use the following command:

systemctl edit docker.service

The config file might look this:

ExecStart=/usr/bin/dockerd --userns-remap=ns1

More information on user namespaces is available here:

Docker Pull Command
Source Repository

Comments (0)