简体   繁体   中英

standard_init_linux.go:219: exec user process caused: exec format error

I built and ran my dockerfile but am getting the error standard_init_linux.go:219: exec user process caused: exec format error . What does this mean and why is this happening per my configuration?

DOCKERFILE:

# 1
FROM python:3.9.2-slim

# 2
COPY requirements.txt /
RUN pip3 install -r /requirements.txt

# 3
COPY . /
WORKDIR /

# 4
RUN "./gunicorn.sh"

gunicorn.sh:

gunicorn "website:create_app()" -w 3 -p 5000

I am using docker build -t gunicorn-flask-example. in the directory of the dockerfile.

I forgot to put #!/bin/sh on the top of 'gunicorn.sh'. Adding this line fixed the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM