Docker container 常用軟體安裝
更新 apt-get
#更新apt-update
apt-get update
vim
sudo apt-get install -y vim
ip
sudo apt-get install -y iproute2
ping
sudo apt-get install -y iputils-ping
ifconfig, netestat
sudo apt-get install -y net-tools
nc (netcat)
sudo apt-get install -y netcat
maven
FROM jenkins/jenkins:lts
RUN apt-get update && apt-get install -y maven
apt-get 使用proxy
#apt_proxy.conf 設定 proxy
Acquire::http::proxy "http://127.0.0.1:8000/";
Acquire::ftp::proxy "ftp://127.0.0.1:8000/";
Acquire::https::proxy "https://127.0.0.1:8000/";
#可以用“-c”選項來指定使用配置檔案
sudo apt-get -c ~/apt_proxy.conf update
#apt-get也有一個“-o”選項,直接跟apt-get的設定變數,就不用指定配置檔案了,比如
sudo apt-get -o Acquire::http::proxy="http://127.0.0.1:8000/" update