Last active
October 25, 2016 13:47
-
-
Save nekonenene/5a517137ec8df7a2d8a1bc924d90974c to your computer and use it in GitHub Desktop.
最新の node, npm を入れる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:trusty | |
LABEL Description="latest npm" Vendor="nekonenene" Version="1.0" | |
## 文字コード設定 | |
RUN locale-gen ja_JP.UTF-8 | |
ENV LANG ja_JP.UTF-8 | |
ENV LANGUAGE ja_JP:ja | |
ENV LC_ALL ja_JP.UTF-8 | |
ENV NODE_VERSION 6.4.0 | |
## 基本的なパッケージのインストール | |
RUN apt-get update && \ | |
apt-get install -y \ | |
curl \ | |
nodejs \ | |
npm | |
## nodejs, npm を最新に | |
# n で nodejs のバージョン管理 | |
RUN npm cache clean && \ | |
npm install -g n && \ | |
n $NODE_VERSION | |
# 最新の npm を取得 | |
RUN curl -L https://npmjs.org/install.sh | sh | |
# apt で入れた nodejs を削除 | |
RUN apt-get purge -y nodejs npm | |
## 不要なパッケージを削除 | |
RUN apt-get autoremove -y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment