Docker基础镜像

Docker 镜像基础包安装

1. Ubuntu/Debian
# 修改为阿里源(ubuntu)
sudo cp /etc/apt/sources.list /etc/apt/sources.list-bak
sudo sed -i s/cn.archive.ubuntu.com/mirrors.aliyun.com/g /etc/apt/sources.list
sudo sed -i s/archive.ubuntu.com/mirrors.aliyun.com/g /etc/apt/sources.list
apt-get update

# 1.ping
apt-get install -y iputils-ping

# 2.ifconfig netstat
apt-get install -y net-tools

# 3.telnet
apt-get install -y telnet

# 4.ca-certificates
apt-get install -y ca-certificates

# 5.curl
apt-get install -y curl
2. Alpine
# 修改源
# 1.阿里源
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
# 2.科大源
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
apk update

# 1.ping


# 2.ifconfig netstat


# 3.telnet
apk add telnet
apk add busybox-extras #Alpine3.7以上

# 4.ca-certificates
apk add ca-certificates

# 5.curl
apk add curl

# 6.ssh
apk add openssh-client
apk add openssh-server

# 7.vim
apk add vim

# 8.mysql-client
apk add mysql-client

你可能感兴趣的:(Docker基础镜像)