Skip to content

Instantly share code, notes, and snippets.

@SteveRohrlack
Created April 22, 2016 07:08
Show Gist options
  • Save SteveRohrlack/57464e278e7e6ce22c7886b9c0a7e974 to your computer and use it in GitHub Desktop.
Save SteveRohrlack/57464e278e7e6ce22c7886b9c0a7e974 to your computer and use it in GitHub Desktop.
Dockerfile example: running sitespeed.io using grunt
FROM java:7
MAINTAINER Steve Rohrlack
# docker run -v $HOME/example-project/sitespeedio-logs/:/usr/local/src/example-project/sitespeedio-logs/ default
# sitespeed.io will write log files and reports to a defined directory
# configure environment
ENV DEBIAN_FRONTEND noninteractive
# install system dependencies
RUN apt-get update
RUN curl -sL https://deb.nodesource.com/setup_5.x | bash -
RUN apt-get install -y nodejs
# working directory
WORKDIR /usr/local/src/example-project/test
# install application dependencies
RUN npm install -g grunt-cli
RUN npm install -g sitespeed.io
COPY package.json /usr/local/src/example-project/test/package.json
RUN npm install
# copy sources
COPY gruntfile.js /usr/local/src/example-project/test/gruntfile.js
COPY grunt/sitespeedio.json /usr/local/src/example-project/test/grunt/sitespeedio.json
CMD ["grunt", "sitespeedio", "-vvv"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment