CloudRouter docker image build

由于us.docker.tiegushi.com:5000现在返回connection refused, 下面的步骤介绍如何从ubuntu 14.04 build出CloudRouter 的 image

  1. 下载Docker的原始 Ubuntu image.

docker pull utuntu:14.04

2. 运行Ubuntu image

docker run -t -i ubuntu:14.04 /bin/bash

记住命令行提示符后的id, 像这样root@904d9fd53211:/#, 第四步要用到.

3. 在Docker 的Ubuntu中安装nodejs, npm, 注意不是外部主机Ubuntu

apt-get update

apt-get install nodejs npm

exit

4. 把新环境保存为基本nodejs image

docker commit -m “add nodejs and npm” -a “Roger Ning” 113f3566cbaf roger/nodeenv:v1

113f3566cbaf第二部运行时命令提示符后的id, 像这样root@904d9fd53211:/#

5. 修改CloudRouter/torrent-tracker-docker/Dockerfile

  • FROM us.docker.tiegushi.com:5000/node:0.1
    +FROM roger/nodeenv:v1

6. Build CloudRouter image

cd CloudRouter/torrent-tracker-docker

docker build -t roger/cloudrouter:v1 .

build成功后可以用docker images命令看见新build的image

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.