LoginSignup
10
10

More than 5 years have passed since last update.

dockerでCentOS 7上にnode.js環境を構築する

Last updated at Posted at 2015-01-25

概要

CentOS 7 上でnode.jsのwebアプリの実行を動作させる環境の構築。
また、jenkinsからバッチを叩きたかったため、jenkinsをインストールしている。

Dockerfile

Dockerfile
FROM centos:7

# install from yum
RUN yum install -y wget tar make gcc gcc-c++ bzip2-devel
RUN rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

# install python
RUN wget http://www.python.org/ftp/python/2.6.9/Python-2.6.9.tgz
RUN tar xvzf Python-2.6.9.tgz
RUN cd Python-2.6.9 && ./configure && make && make install

# install node.js
RUN wget http://nodejs.org/dist/v0.10.35/node-v0.10.35.tar.gz
RUN tar zxvf node-v0.10.35.tar.gz
ENV PYTHON /usr/local/bin/python2.6
RUN cd node-v0.10.35 && $PYTHON ./configure --dest-cpu=x64 --dest-os=linux && make && make install
EXPOSE 80

# install jenkins
RUN wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
RUN rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
RUN yum install -y jenkins
EXPOSE 8080

CMD systemctl start jenkins && /bin/bash
10
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10