2015-01-26 23:49:42 +01:00
|
|
|
# start with docker's base ubuntu image
|
|
|
|
FROM ubuntu:14.04
|
|
|
|
MAINTAINER Adam Brown "adamarthurryan@gmail.com"
|
|
|
|
|
|
|
|
|
|
|
|
# update package sources
|
2015-01-27 02:07:01 +01:00
|
|
|
# and get some basics
|
|
|
|
RUN apt-get -y update && apt-get -y install \
|
|
|
|
build-essential \
|
|
|
|
libssl-dev \
|
|
|
|
curl \
|
|
|
|
git
|
2015-01-26 23:49:42 +01:00
|
|
|
|
|
|
|
# install node.js
|
|
|
|
RUN curl -sL https://deb.nodesource.com/setup | bash -
|
|
|
|
RUN apt-get install -y nodejs
|
|
|
|
|
2015-02-15 21:15:48 +01:00
|
|
|
# install ruby
|
|
|
|
RUN apt-get install -y ruby1.9.1 ruby1.9.1-dev
|
2015-02-10 07:10:08 +01:00
|
|
|
|
2015-01-27 02:07:01 +01:00
|
|
|
# add a user
|
|
|
|
RUN useradd -ms /bin/bash docker
|
2015-01-26 23:49:42 +01:00
|
|
|
|
|
|
|
# switch to the docker user
|
|
|
|
ENV HOME /home/docker
|
|
|
|
USER docker
|
|
|
|
|
2015-02-15 21:15:48 +01:00
|
|
|
# configure ruby gems to run from the home directory
|
|
|
|
ENV PATH $PATH:/home/docker/.gem/ruby/1.9.1/bin
|
|
|
|
|
|
|
|
# install some ruby gems
|
|
|
|
RUN gem install --user-install sass
|
|
|
|
RUN gem install --user-install compass
|
|
|
|
|
2015-01-27 02:07:01 +01:00
|
|
|
# configure npm to run without sudo permissions
|
|
|
|
RUN echo 'prefix=${HOME}/.npm-packages' >> $HOME/.npmrc
|
2015-01-26 23:49:42 +01:00
|
|
|
|
2015-01-27 02:07:01 +01:00
|
|
|
ENV NPM_PACKAGES $HOME/.npm-packages
|
|
|
|
ENV NODE_PATH $NPM_PACKAGES/lib/node_modules:$NODE_PATH
|
2015-02-15 21:15:48 +01:00
|
|
|
ENV PATH $PATH:$NPM_PACKAGES/bin
|
|
|
|
ENV MANPATH $(manpath):$NPM_PACKAGES/share/man
|
2015-01-26 23:49:42 +01:00
|
|
|
|
|
|
|
# install yeoman tooling and other npm packages
|
|
|
|
RUN npm install -g node-gyp
|
|
|
|
RUN npm install -g yo bower grunt-cli
|
2015-02-10 07:10:08 +01:00
|
|
|
RUN npm install -g generator-webapp generator-angular generator-angular-fullstack generator-polymer
|
2015-01-27 02:07:01 +01:00
|
|
|
|
2015-02-10 07:10:08 +01:00
|
|
|
# #create a data volume
|
|
|
|
# actually, let's just leave this to the command line
|
|
|
|
# VOLUME /data
|
2015-01-27 03:06:38 +01:00
|
|
|
|
2015-02-10 07:10:08 +01:00
|
|
|
# #expose the ports
|
|
|
|
# actually, let's just leave this to the command line
|
|
|
|
# EXPOSE 8000
|
|
|
|
# EXPOSE 9000
|
|
|
|
# EXPOSE 3000
|
|
|
|
# EXPOSE 35729
|
2015-01-27 03:06:38 +01:00
|
|
|
|
2015-02-01 22:02:11 +01:00
|
|
|
# configure git
|
2015-02-10 07:10:08 +01:00
|
|
|
RUN git config --global push.default simple
|
|
|
|
RUN git config --global credential.helper cache
|
|
|
|
RUN git config --global credential.helper 'cache --timeout=43200'
|
2015-02-01 22:02:11 +01:00
|
|
|
|
2015-02-10 07:10:08 +01:00
|
|
|
# it would be nice if npm packages could be shared between instances...
|
|
|
|
# however it is difficult to both: add global packages from the Dockerfile
|
|
|
|
# and at the same time have the packages saved in a volume
|