dcoker 小应用(一)

docker 创建Ubuntu系统

1、创建Dockerfile

 1 #ubuntu:14.04 image
 2 
 3 FROM ubuntu:14.04
 4 
 5 MAINTAINER XXX, xxx@xxx.com
 6 
 7 RUN apt-get update
 8 RUN apt-get -y install git
 9 RUN apt-get -y install autoconf
10 RUN apt-get -y install binutils
11 RUN apt-get -y install build-essential
12 RUN apt-get -y install libzip-dev
13 RUN apt-get -y install libbz2-dev

注:ubuntu 版本14.04

  xxx创建

  在Ubuntu系统里面升级git 等之类的库文件!

2、运行docker Deckefile

 1 sudo docker build -t ares_ubuntu:14.04 ./ 

注:-t 后面是images REPOSITORY与id 

3、查看 dcoker images

sudo docker images

简单的镜像就已经完成了

4、运行

 1 sudo docker run -t ares_ubuntu:14.04 bash 

那么就有一个全新的Ubuntu系统了

原文地址:https://www.cnblogs.com/wipy/p/4261671.html