设计大师网站,衡阳市建设协会网站,优化网站架构,桂林网页开发1.拉取alpine镜像
docker pull alpine
2.运行镜像成为容器
docker run -it --rm alpine sh
(--rm标志确保容器在退出时被自动删除。)
3.容器建立后#xff0c;运行
docker exec -it container_id sh
4.进入容器里的 alpine环境
①.配置安装源
cat /etc…1.拉取alpine镜像
docker pull alpine
2.运行镜像成为容器
docker run -it --rm alpine sh
(--rm标志确保容器在退出时被自动删除。)
3.容器建立后运行
docker exec -it container_id sh
4.进入容器里的 alpine环境
①.配置安装源
cat /etc/apk/repositories -EOF
https://mirrors.ustc.edu.cn/alpine/edge/main
https://mirrors.ustc.edu.cn/alpine/edge/community
https://mirrors.ustc.edu.cn/alpine/edge/testing
EOF
apk update apk upgrade
采用用国内阿里云的源文件内容为: https://mirrors.aliyun.com/alpine/v3.9/main/ https://mirrors.aliyun.com/alpine/v3.9/community/ 如果采用中国科技大学的源文件内容为 https://mirrors.ustc.edu.cn/alpine/v3.9/main/ https://mirrors.ustc.edu.cn/alpine/v3.9/community/ 采用清华源文件内容为 https://mirror.tuna.tsinghua.edu.cn/alpine/v3.9/main/ https://mirror.tuna.tsinghua.edu.cn/alpine/v3.9/community/ ②.安装软件
服务管理系统叫 OpenRC
安装一下 apk add openrc
安装其他软件 apk add curl vim bash bash-completion openssh
③.安装用户管理工具修改 root 用户的 shell 为 bash默认使用的是 ash。
apk add shadow
usermod -s /bin/bash root
④.删除软件包命令
apk del XXX