我正在尝试在Ubuntu容器中下载Debian软件包,如下所示:
sudo docker run ubuntu:14.04 wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.8.2-omnibus.1-1_amd64.deb
我懂了
exec: "wget": executable file not found in $PATH
我已经安装wget了docker,如下所示:
wget
run ubuntu:14.04 apt-get install wget
如何下载文件?
您需要先安装它。创建一个新的Dockerfile,并在其中安装wget:
Dockerfile
FROM ubuntu:14.04 RUN apt-get update \ && apt-get install -y wget \ && rm -rf /var/lib/apt/lists/*
然后,构建该图像:
docker build -t my-ubuntu .
最后,运行它:
docker run my-ubuntu wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.8.2-omnibus.1-1_amd64.deb