制作docker image
2022-10-02 本文已影响0人
Jesse4023
1.拉取 CentOS7 镜像
docker pull centos:centos7
2.运行
docker run -it docker.io/centos:centos7 /bin/bash
3.一顿操作
4.docker commit制作镜像
docker commit <container的ID> <新的image_name> eg:docker commit f244d3271c14 centos7:web
5.下载到本地
docker save 9288b381a935 > /tmp/clickhouse-server.tar
6.加载
docker load < clickhouse-server.tar
7.修改当前镜像标签
docker tag d78039877b24 web:laste
8.运行(可能会失败,原因是没权限或终端 需加上)
docker run --privileged -it -d -p 7001:7001 -p 9001:9001 -p 9002:9002 -v /root/app:/app xxx:web
安装redis
https://blog.csdn.net/qq_38584262/article/details/125773286
yum -y install gcc automake autoconf libtool make
安装nginx
https://blog.csdn.net/qq_33381971/article/details/123328191