Skip to content

Instantly share code, notes, and snippets.

@adambarthelson
Created June 27, 2016 18:47
Show Gist options
  • Save adambarthelson/ef57b7b90814c771be9a02381ef2182b to your computer and use it in GitHub Desktop.
Save adambarthelson/ef57b7b90814c771be9a02381ef2182b to your computer and use it in GitHub Desktop.
Example Dockerfile for Angular Fullstack
FROM node
MAINTAINER Adam Barthelson
RUN npm cache clean -f
RUN npm install -g grunt-cli
RUN npm install -g bower
# Install Ruby
ADD http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz /tmp/
RUN cd /tmp && tar -xzf /tmp/ruby-2.1.2.tar.gz
RUN cd /tmp/ruby-2.1.2/ && ./configure --disable-install-doc && make && make install
RUN rm -rf /tmp/*
# Install Ruby Gems
ADD http://production.cf.rubygems.org/rubygems/rubygems-2.4.1.tgz /tmp/
RUN cd /tmp && tar -xzf /tmp/rubygems-2.4.1.tgz
RUN cd /tmp/rubygems-2.4.1 && ruby setup.rb
RUN rm -rf /tmp/*
# Install Compass
RUN echo "gem: --no-ri --no-rdoc" > ~/.gemrc
RUN gem install compass --no-rdoc --no-ri
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
ADD . /usr/src/app
# Install dependencies
RUN npm install
RUN bower install --allow-root
# Build
RUN grunt build
ENV NODE_ENV production
EXPOSE 8080
CMD [ "node", "dist/server/app.js" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment