简体   繁体   English

启动容器进程导致 "exec: \\"uwsgi\\": executable file not found in $PATH": unknown

[英]starting container process caused "exec: \"uwsgi\": executable file not found in $PATH": unknown

I am trying to start a docker container and I am getting the error "Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: "uwsgi": executable file not found in $PATH": unknown".我正在尝试启动 docker 容器,但收到错误“来自守护进程的错误响应:OCI 运行时创建失败:container_linux.go:349:启动容器进程导致”exec:“uwsgi”:在 $PATH 中找不到可执行文件: 未知”。 I think it is related to my dockerfile and uwsgi file but I am unsure as to why I cannot start my container.我认为这与我的 dockerfile 和 uwsgi 文件有关,但我不确定为什么我无法启动我的容器。 I have already pip installed uwsgi.我已经 pip 安装了 uwsgi。 I also haven't found any other solutions apart from installing uwsgi even though its already there除了安装 uwsgi 之外,我还没有找到任何其他解决方案,即使它已经存在

Docker File Docker 文件

##
## Dockerfile to generate a Docker image from a GeoDjango project
##

# Start from an existing image with Python 3.8 installed
FROM python:3.8

MAINTAINER Mark Foley

# Run a series of Linux commands to ensure that
# 1. Everything is up-to-date and
# 2. Install GDAL
RUN apt-get -y update && apt-get -y upgrade && apt-get -y install libgdal-dev

# Make a working directoir in the image and set it as working dir.
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

# make sure that pip & setuptools are installed and to date
RUN pip install --upgrade pip setuptools wheel

# Get the following libraries. We caan install them "globally" on the image as it will contain only our project
RUN apt-get -y install build-essential python-cffi libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info

# You should have already exported your Python library reuirements to a "requiremnts.txt" file using pip.
# Now copy this to the image and install everything in it.
COPY requirements.txt /usr/src/app
RUN pip install -r requirements.txt

# Copy everything in your Django project to the image.
COPY . /usr/src/app

# Make sure that static files are up to date and available
RUN python manage.py collectstatic --no-input

# Expose port 8001 on the image. We'll map a localhost port to this later.
EXPOSE 8001

# Run "uwsgi". uWSGI is a Web Server Gateway Interface (WSGI) server implementation that is typically used to run Python
# web applications.
CMD ["uwsgi", "--ini", "uwsgi.ini"]

UWSGI File UWSGI 文件

[uwsgi]

#=======================
# DO NOT EDIT THIS FILE
#=======================

# chdir to the folder of this config file
chdir = %d
# %d is the dir this configuration file is in
#socket = %dapp.sock
http = :8001
# load the module from wsgi.py, it is a python path from
# the directory above.
module = geodjango_2021.wsgi:application
# allow anyone to connect to the socket (666). This is very permissive
chmod-socket=664

master = true
processes = 4
vacuum = true
#harakiri = 30
#threads = 2 

Try to install uwsgi in your requirement.txt file尝试在你的requirements.txt文件中安装uwsgi

$ pip install uwsgi $ pip 安装 uwsgi

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 启动容器进程导致“exec: > \\”exec\\”:在 $PATH 中找不到可执行文件”:未知 - starting container process caused "exec: > \"exec\": executable file not found in $PATH": unknown 运行 docker 容器时出错:启动容器进程导致“exec:\”python\“:在 $PATH 中找不到可执行文件”:未知 - Error running docker container: starting container process caused "exec: \"python\": executable file not found in $PATH": unknown 启动容器进程导致:exec:“powershell”:$PATH 中找不到可执行文件:未知 - Starting container process caused: exec: “powershell”: executable file not found in $PATH: unknown 启动容器进程导致“exec:\”bash\“:在 $PATH 中找不到可执行文件”:未知 - starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown 启动容器进程导致“exec:\\”go\\”:$PATH 中找不到可执行文件”:未知 - starting container process caused "exec: \"go\": executable file not found in $PATH": unknown Docker 启动容器进程导致“exec:\\”arg\\“:在 $PATH 中找不到可执行文件”:未知。 - Docker starting container process caused “exec: \”arg\“: executable file not found in $PATH”: unknown. Docker:启动容器进程导致“exec:\”-n\“:$PATH中找不到可执行文件”:未知 - Docker : starting container process caused “exec: \”-n\“: executable file not found in $PATH”: unknown 启动容器进程导致“exec:\”command\“:$PATH 中找不到可执行文件”:未知 - starting container process caused “exec: \”command\“: executable file not found in $PATH”: unknown Docker Go 映像:启动容器进程导致:exec:“app”:在 $PATH 中找不到可执行文件:未知 - Docker Go image: starting container process caused: exec: "app": executable file not found in $PATH: unknown 启动容器进程导致:exec:“uvicorn”:$PATH 中找不到可执行文件:未知 - starting container process caused: exec: "uvicorn": executable file not found in $PATH: unknown
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM