I am using Docker first time in my life and with various tutorials I got to this stage here. All steps are finishing correctly, but after last step succeeds I receive this error:
Successfully built 66717d9cdec1
Successfully tagged movie_universe_app:latest
Recreating movie_universe_app_1 ... done
Attaching to movie_universe_app_1
app_1 | python: can't open file 'manage.py': [Errno 2] No such file or directory
movie_universe_app_1 exited with code 2
And I don't know how to fix it. Here are my files:
Dockerfile:
FROM python:3.8-alpine
ENV PATH="/scripts:${PATH}"
COPY ./requirements.txt /requirements.txt
RUN apk add --update --no-cache --virtual .tmp gcc libc-dev linux-headers
RUN pip install -r /requirements.txt
RUN apk del .tmp
RUN mkdir /movie_universe
COPY ./movie_universe /movie_universe
WORKDIR /movie_universe
COPY ./scripts /scripts
RUN chmod +x /scripts/*
RUN mkdir -p /vol/web/media
RUN mkdir -p /vol/web/
RUN adduser -D user
RUN chown -R user:user /vol
RUN chmod -R 755 /vol/web
USER user
CMD ["entrypoint.sh"]
docker-compose.yml
version: "3.7"
services:
app:
build:
context: .
ports:
- "8888:8888"
volumes:
- ./movie_universe:/movie_universe
command: sh -c "python manage.py runserver 0.0.0.0:8888"
environment:
- DEBUG=1
entrypoint.sh:
#!/bin/sh
set -e
python manage.py collectstatic --noinput
uwsgi --socket :8888 --master --enable-threads --module app.wsgi
I tried to delete "volumes:" from docker-compose.yml but it is still not working.
Can please someone help me? Thanks.