004-Docker镜像
Docker镜像 一个通用的私有仓库,可以提升效率 Docker镜像构建分为两种,一种是 手动构建 ,一种是 Dockerfile(自动构建) 基于centos镜像构建手动制作nginx镜像 docker run --name testdocker -it centos yum install wget -y wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo yum install nginx -y nginx配置文件中需要运行在前台,vi /etc/nginx/nginx.conf 中加入 daemon off; root@jenkins:~# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 627b8bcc624c centos "/bin/bash" 29 minutes ago Exited (0) 15 seconds ago dockerfornginx root@jenkins:~# docker commit -m "test nginx" 627b8bcc624c dockerfornginx/dockerfornginx:v1 sha256