Docker容器更新ubuntu源
sudo sed -i -re 's/([a-z]{2}.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
然后执行
apt update
Docker容器内安装常用工具
- Docker安装vim
apt-get install vim
- Docker安装cron
apt-get install cron
注:此时cron还未启动,需执行一下命令,启动cron
/usr/sbin/cron