Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@
#

# Pull base image.
FROM dockerfile/python
FROM dockerfile/ubuntu

# Select the version you want to use
# e.g.: latest, unstable, 0.11.12, 0.10.2, ..
ENV nodeVersion latest

#Suppress debian frontend errors
ENV DEBIAN_FRONTEND noninteractive

# Install Node.js
RUN \
cd /tmp && \
wget http://nodejs.org/dist/node-latest.tar.gz && \
tar xvzf node-latest.tar.gz && \
rm -f node-latest.tar.gz && \
cd node-v* && \
./configure && \
CXX="g++ -Wno-unused-local-typedefs" make && \
CXX="g++ -Wno-unused-local-typedefs" make install && \
cd /tmp && \
rm -rf /tmp/node-v* && \
npm install -g npm && \
echo -e '\n# Node.js\nexport PATH="node_modules/.bin:$PATH"' >> /root/.bashrc
apt-get update && \
apt-get install -y npm && \
ln -sf /usr/bin/nodejs /usr/local/bin/node && \
apt-get install -y curl && \
rm -rf /var/lib/apt/lists/* && \
npm install -g n && \
n ${nodeVersion} && \
echo '\n# Node.js\nexport PATH="node_modules/.bin:$PATH"' >> /root/.bashrc

# Define working directory.
WORKDIR /data

# Define default command.
CMD ["bash"]
CMD ["node", "-v"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This repository contains **Dockerfile** of [Node.js](http://nodejs.org/) for [Do

### Base Docker Image

* [dockerfile/python](http://dockerfile.github.io/#/python)
* [dockerfile/ubuntu](http://dockerfile.github.io/#/ubuntu)


### Installation
Expand Down