Skip to content

Instantly share code, notes, and snippets.

@visualjeff
Created August 7, 2014 20:42
Show Gist options
  • Save visualjeff/ea33feb4f77bdfa60eb3 to your computer and use it in GitHub Desktop.
Save visualjeff/ea33feb4f77bdfa60eb3 to your computer and use it in GitHub Desktop.
Dockerfile for ember-cli
# Docker version 1.1.2, build d84a070
FROM ubuntu:14.04
RUN apt-get update && apt-get install -y \
git \
software-properties-common \
python-software-properties \
make\
gcc \
g++ \
curl \
wget \
tar \
openssh-server \
nano
RUN mkdir /var/run/sshd
RUN echo 'root:tomster'|chpasswd
RUN add-apt-repository ppa:chris-lea/node.js
RUN apt-get update && apt-get install -y \
nodejs
# Create a nonroot user, and switch to it
RUN /usr/sbin/useradd --create-home --home-dir /usr/local/nonroot --shell /bin/bash nonroot
RUN /usr/sbin/adduser nonroot sudo
RUN echo 'nonroot:tomster'|chpasswd
RUN chown -R nonroot /usr/local/
RUN chown -R nonroot /usr/lib/
RUN chown -R nonroot /usr/bin/
RUN /bin/su nonroot
RUN npm install -g ember-cli
RUN npm install -g bower
RUN npm install -g phantomjs
RUN npm install -g forever
RUN exit
EXPOSE 22
EXPOSE 4200
@visualjeff
Copy link
Author

To generate the image put the dockerfile in a directory and execute the command:

sudo docker build -t visualjeff/ember-cli .

On completion tag it (don't forget to increment the tag number. Currently 0.0.40):

sudo docker tag <container_id> visualjeff/ember-cli:0.0.40

Test it:

sudo docker run -t -i -P visualjeff/ember-cli:0.0.40 /bin/bash

Then push to the docker hub (my account is visualjeff but a different hub account could be used):

sudo docker push visualjeff/ember-cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment