dockerfile Example of Jenkins+nodejs

Source: Internet
Author: User
Tags mkdir dockerfile example docker hub docker run

Recently has been engaged in Docker under the Jenkins+nodejs, in the last few days finally put some difficult problems to solve. I guess a lot of friends want to Docker under Jenkins+nodejs dockerfile file, I searched the Docker hub, Do not know is jenkins+nodejs with less or how, very few people share Jenkins+nodejs dockerfile file, now I write my share to everyone, hope not to spray me oh.
Software version: Jenkins 1.651.2
Nodejs 5.3.0 (If you think my Nodejs version is low, please change the high version yourself)
Docker 1.7.1

The following is the Dockerfile file for Jenkins+nodejs:
From jenkins:1.651.2
USER Root

RUN apt-get update && apt-get install-y \
Build-essential \
GCC \
Git \
python2.7

RUN wget http://nodejs.org/dist/v5.3.0/node-v5.3.0.tar.gz && \
Tar zxf node-v5.3.0.tar.gz && \
CD node-v5.3.0 && \
./configure && \
Make && \
Make install && \
Ln-s/usr/local/bin/node/usr/bin/node

RUN CD/&&
RM node-v5.3.0.tar.gz && \
RM-FR node-v5.3.0

RUN NPM Config Set Registry https://registry.npm.taobao.org

RUN Mkdir/var/app

Volume/var/app

USER Jenkins

Made into Docker mirrors:

Mkdir/tmp/jenkins_nodejs
MV dockerfile/tmp/jenkins_nodejs/
Docker build-t Rocdk890/jenkins-nodejs.

When done, use Docker images to see a rocdk890/jenkins-nodejs:latest mirror that integrates Jenkins+nodejs Docker mirrors.

Let's give you a starting example:
Docker run--name jenkins_nodejs-itd \
-P 8080:8080-p 3000:3000-p 50,000:50,000 \
-v/srv/docker/jenkins/jenkins:/var/jenkins_home \
-v/srv/docker/node/app:/var/app \
-U root \
Rocdk890/jenkins-nodejs:latest

OK, the rest of how to use Jenkins and Nodejs to see everyone, I do not have anything.

Original from: http://blog.slogra.com/post-653.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.