Issue
When I docker build
this:
FROM ubuntu:22.04
RUN apt-get install -y python3
I get
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
What's wrong?
Solution
First run apt-get upgrade
then you can install python
packages.
Here is an example:
FROM ubuntu:22.04
RUN apt-get upgrade
RUN apt-get install -y python3
PS:
i don't know about you motivation to use Ubuntu image but may you consider about use Alpine image
Answered By - Kafarson Answer Checked By - Robin (WPSolving Admin)