Skip to content

Instantly share code, notes, and snippets.

@lighta971
Created August 8, 2014 19:41
Show Gist options
  • Save lighta971/5d205a14b35f806170d2 to your computer and use it in GitHub Desktop.
Save lighta971/5d205a14b35f806170d2 to your computer and use it in GitHub Desktop.
Cordova dockerfile
# Cordova tools for ubuntu precise (12.04 LTS).
# version 0.0.1
FROM ahazem/android:v0.7.6
MAINTAINER peernohell <[email protected]>
# Install jdk7 and uninstall oracle-jdk6
RUN add-apt-repository ppa:webupd8team/java && apt-get update
RUN apt-get -y install oracle-java7-installer && rm -rf /usr/lib/jvm/java-6-oracle
# Change JAVA_HOME variable
ENV JAVA_HOME /usr/lib/jvm/java-7-oracle
# add nodejs to install cordova (code from https://index.docker.io/u/dockerfile/nodejs/)
RUN add-apt-repository -y ppa:chris-lea/node.js
RUN apt-get update
RUN apt-get install -y nodejs
# Append to $PATH variable.
RUN echo '\n# Node.js\nexport PATH="node_modules/.bin:$PATH"' >> /root/.bash_profile
# install cordova
RUN npm install -g cordova
# Clean
RUN apt-get autoremove && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.npm /var/cache/apt/* && \
npm cache clear
VOLUME /workspace
WORKDIR /workspace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment