0

Ubuntu 24.04.1 LTS when I tried to run "docker build ." getting the error while running the below docker file :

FROM ubuntu

WORKDIR /app

COPY requirements.txt /app COPY devops /app

RUN apt-get update &&
apt-get install -y python3 python3-pip &&
pip install -r requirements.txt &&
cd devops

ENTRYPOINT ["python3"] CMD ["manage.py", "runserver", "0.0.0.0:8000"]

debconf: unable to initialize frontend: Dialog
56.26 debconf: (TERM is not set, so the dialog frontend is not usable.)
56.26 debconf: falling back to frontend: Readline
56.26 debconf: unable to initialize frontend: Readline
56.26 debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC entries checked: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.38.2 /usr/local/share/perl/5.38.2 /usr/lib/x86_64-linux-gnu/perl5/5.38 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.38 /usr/share/perl/5.38 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 8.)
56.26 debconf: falling back to frontend: Teletype



also below error 

error: externally-managed-environment
271.1 
271.1 × This environment is externally managed
271.1 ╰─> To install Python packages system-wide, try apt install
271.1     python3-xyz, where xyz is the package you are trying to
271.1     install.
271.1     
271.1     If you wish to install a non-Debian-packaged Python package,
271.1     create a virtual environment using python3 -m venv path/to/venv.
271.1     Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
271.1     sure you have python3-full installed.
271.1     
271.1     If you wish to install a non-Debian packaged Python application,
271.1     it may be easiest to use pipx install xyz, which will manage a
271.1     virtual environment for you. Make sure you have pipx installed.
271.1     
271.1     See /usr/share/doc/python3.12/README.venv for more information.
271.1 
271.1 note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
271.1 hint: See PEP 668 for the detailed specification.
------
Dockerfile:8
--------------------
   7 |     
   8 | >>> RUN apt-get update && \
   9 | >>>     apt-get install -y python3 python3-pip && \
  10 | >>>     pip install -r requirements.txt && \
  11 | >>>     cd devops
  12 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update &&     apt-get install -y python3 python3-pip &&     pip install -r requirements.txt &&     cd devops" did not complete successfully: exit code: 1
muru
  • 207,228

0 Answers0