standard_init_linux.go:211: exec user process caused "no such file or directory"?

  django, docker, dockerfile, entry-point, python

Dockerfile

FROM python:3.7.4-alpine

ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
ENV LANG C.UTF-8
MAINTAINER "[email protected]"


RUN apk update && apk add postgresql-dev gcc musl-dev
RUN apk --update add build-base jpeg-dev zlib-dev
RUN pip install --upgrade setuptools pip

RUN mkdir /code
WORKDIR /code

COPY requirements.txt /code/
RUN pip install -r requirements.txt
COPY . /code/

#CMD ["gunicorn", "--log-level=DEBUG", "--timeout 90", "--bind", "0.0.0.0:8000", "express_proj.wsgi:application"]
ENTRYPOINT ["./docker-entrypoint.sh"]

docker-entrypoint.sh

#!/bin/bash

# Prepare log files and start outputting logs to stdout
touch /code/gunicorn.log
touch /code/access.log
tail -n 0 -f /code/*.log &

# Start Gunicorn processes
echo Starting Gunicorn.
exec gunicorn express_proj.wsgi:application 
    --name express 
    --bind 0.0.0.0:8000 
    --log-level=info 
    --log-file=/code/gunicorn.log 
    --access-logfile=/code/access.log 
    --workers 2 
    --timeout 90 
    "[email protected]"

Getting Error
standard_init_linux.go:211: exec user process caused "no such file or directory"
Need help.
Some saying to use dos2unix(i do not know hoe to use it.)

Source: Dockerfile Questions

LEAVE A COMMENT