Create Dockerfile to build ionic/node.js from github

Hi, I need a Dockerfile that git clones an ionic (-> [url removed, login to view]) project from a private repo and does a grunt build. Below are some examples commands I used. But got the grunt build seems to have issue finding the ruby/compass or so. Maybe installed for wrong user. at least when the run the docker and call cordova on bash it has issues finding the right cordova??? So feel free to use some commands below or change as needed.

In the end it will need to:

1) add ssh-key

2) git clone project (and don't cache that)

3) run the install and build process with

npm install

bower install --allow-root

grunt build

cordova restore plugins --experimental

grunt serve (port mapped so host can access)

4) access grunt serve from localhost:port, where port is mapped port


- suggest to start with the following base, but happy if you want to use other as long as base is Ubuntu

# Node.js w/ Bower & Grunt runtime Dockerfile

# [url removed, login to view]

# Pull base image.

FROM dockerfile/nodejs-bower-grunt

then install Ruby & Compass, maybe like the following?

# Install Ruby.


apt-get update && \

apt-get install -y ruby ruby-dev ruby-bundler && \

rm -rf /var/lib/apt/lists/*

# Install Compass

RUN gem install compass

ssh key I would add myself via

# Copy over private key, and set permissions

RUN mkdir -p /root/.ssh

# Create known_hosts

RUN touch /root/.ssh/known_hosts

# Remove host checking

RUN echo "Host [url removed, login to view]\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config

# map your local dir to /host via run -v option

ADD ./id_rsa /root/.ssh/id_rsa

RUN chmod 600 /root/.ssh/id_rsa

also need to install ionic & cordova

# Install Ionic

RUN npm install -g cordova ionic

# when i did that and later logged on via docker run it wasn't instealled? maybe installed under different user? See other ionic Dockerfile exmaple build on centos (but I prefer Ubunut)

[url removed, login to view]


[url removed, login to view]

# download code from github - will change to actual repo - for testing pull some dummy

RUN git clone git(at)[url removed, login to view]:[url removed, login to view] ./dummy

WORKDIR ./dummy/

# build.

RUN npm install

RUN bower install --allow-root

RUN grunt build

RUN cordova restore plugins --experimental

RUN grunt serve

Habilidades: Construção, Git, node.js

Veja mais: dockerfile nodejs git, ubuntu on android, ubuntu for android download, ubuntu for android, ssh android, ruby gem update, root your android, root for android, root android 4.1.2, root access android, github node js, gem update, compass for android, bash copy, at&t android update, android update download, android ssh, android runtime, android root download, android root access, android permissions, build gem, angular node.js, want to build, vagrant

Acerca do Empregador:
( 20 comentários ) Stuttgart, Germany

ID do Projeto: #6795980

Concedido a:


I am experienced with Docker and use it daily in my professional work. I am an active member of the Docker community and believe strongly in using Docker to simplify my application deployment process. I have built Mais

€26 EUR em 1 dia
(0 Comentários)

3 freelancers estão ofertando em média €26 para esse trabalho


I am having mobile app development exposure using phonegap, ionic. I am the best choice for this project. I have already done a number of phonegap apps, websites, control penals and cloud computing projects like online Mais

€23 EUR em 1 dia
(0 Comentários)

La propuesta todavía no ha sido proveída

€29 EUR in 3 dias
(0 Comentários)