当我
docker build
这个时:
FROM ubuntu:22.04
RUN apt-get install -y python3
我明白了
Step 1/2 : FROM ubuntu:22.04
---> c6b84b685f35
Step 2/2 : RUN apt-get install -y python3
---> Running in d1f4eff8d024
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package python3
怎么了?
首先运行
apt-get upgrade
然后就可以安装python
包了。
这是一个例子:
FROM ubuntu:22.04
RUN apt-get upgrade
RUN apt-get install -y python3