Public Repository

Last pushed: 2 years ago
Short Description
Docker container for Cordova development
Full Description

github: https://github.com/oren/docker-cordova

Quick Setup

echo "alias cordova='docker run --rm -i -v \$(pwd):/workspace -w /workspace --privileged -v /dev/bus/usb:/dev/bus/usb oreng/cordova cordova'" >> ~/.bash_aliases
source ~/.bash_aliases
cordova

Run

cordova create hello com.example.hello HelloWorld
cd hello
cordova platform add android
cordova build

Setup on your laptop (with a Dockerfile)

git clone git@github.com:oren/docker-cordova.git
cd docker-cordova
docker build -t cordova .
echo "alias cordova='docker run --rm -i -v \$(pwd):/workspace -w /workspace --privileged -v /dev/bus/usb:/dev/bus/usb cordova cordova'" >> ~/.bash_aliases
source ~/.bash_aliases

Dockerfile

# Cordova tools for ubuntu precise (12.04 LTS).
# # version 0.0.1
FROM ahazem/android:v0.7.6

MAINTAINER peernohell <peernohell@gmail.com>

# 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

VOLUME /workspace
WORKDIR /workspace
Docker Pull Command
Owner
oreng