更新时间:2023-01-01 20:20:53
通过对dockerfile进行以下更改,我能够使docker容器运行
I was able to make the docker container run by making following changes to the dockerfile
FROM python:3.6.8
COPY . /app
WORKDIR /app
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -y
RUN apt install libgl1-mesa-glx -y
RUN apt-get install 'ffmpeg'\
'libsm6'\
'libxext6' -y
RUN pip3 install --upgrade pip
RUN pip3 install opencv-python==4.3.0.38
RUN pip3 install -r requirements.txt
EXPOSE 80
CMD ["python3", "server.py"]
解决libGl错误所需的行
The lines required for resolving the libGl error
RUN apt install libgl1-mesa-glx -y
RUN apt-get install 'ffmpeg'\
'libsm6'\
'libxext6' -y
在不更新ubuntu环境的情况下无法运行.此外,将Docker映像创建为非交互式可以帮助跳过任何交互式命令行输入
were not able to run without updating the ubuntu environment. Moreover creating the docker image as noninteractive helped to skip any interactive command line inputs