Skip to content

Instantly share code, notes, and snippets.

@gicmo
Created November 30, 2014 19:15
Show Gist options
  • Save gicmo/abef9096d315fcbf2e90 to your computer and use it in GitHub Desktop.
Save gicmo/abef9096d315fcbf2e90 to your computer and use it in GitHub Desktop.
Dockerfile for ohmage 3.0 front-end
FROM buildpack-deps
# base on tomcat from docker
MAINTAINER Christian Kellner [email protected]
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get update && apt-get install -y \
ca-certificates \
curl \
git
# verify gpg and sha256: http://nodejs.org/dist/v0.10.31/SHASUMS256.txt.asc
# gpg: aka "Timothy J Fontaine (Work) <[email protected]>"
RUN gpg --keyserver pgp.mit.edu --recv-keys 7937DFD2AB06298B2293C3187D33FF9D0246406D
#for older versions
RUN gpg --keyserver pgp.mit.edu --recv-keys B0A78B0A6C481CF6
ENV NODE_VERSION 0.10.1
ENV NPM_VERSION 1.4.6
RUN curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \
&& curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --verify SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-x64.tar.gz\$" SHASUMS256.txt.asc | sha256sum -c - \
&& tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \
&& rm "node-v$NODE_VERSION-linux-x64.tar.gz" SHASUMS256.txt.asc \
&& npm install -g npm@"$NPM_VERSION" \
&& npm cache clear
RUN npm install -g bower
RUN npm install -g [email protected]
RUN mkdir -p /home/ohmage
WORKDIR /home/ohmage
#RUN git clone https://github.com/ohmage/front-end.git
#WORKDIR /home/ohmage/front-end
Add . /home/ohmage
RUN npm install
RUN bower install --allow-root
RUN ember build
EXPOSE 4200
CMD ["bash"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment