Kubernetes(k8s)
1、干货满满!10分钟看懂Docker和K8S
centos7配置国内yum源
官网: https://www.docker.com/ 仓库:https://hub.docker.com/ EPEL仓库:yum install -y epel-release
安装docker:参考官网:https://docs.docker.com/engine/install/centos/ 安装docker-compose:参考官网: https://docs.docker.com/compose/install/ 配置文件:/etc/docker下
配置阿里云镜像:https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://3bmvccb9.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
启动:service docker start
docker help
#Run 'docker COMMAND --help' for more information on a command
docker run --help
docker exec -it 73331767f28b /bin/bash
docker run -p 3306:3306 --name mysql -v ${PWD}/mysql/conf:/etc/mysql/conf.d -v ${PWD}/mysql/logs:/logs -v ${PWD}/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql
docker run -p 6379:6379 -v ${PWD}/myredis/data:/data -v ${PWD}/myredis/conf/redis.conf:/usr/local/etc/redis/redis.conf -d redis redis-server /usr/local/etcredis/redis.conf --appendonly yes
2、Ubuntu 安装Docker及基本用法
在 Ubuntu 上如何安装Docker及基本用法
3、Docker容器开机自动启动
Docker容器开机自动启动