Cannot Start Django in Docker

I am trying to run Django-packages in Docker, but I am unable to.

I am getting the following:-

  • Docker Neo4j Container keeps stopping - how to debug?
  • Selecting a proper Docker base image
  • Do Docker images save the memory state?
  • Different result using docker-compose vs docker run
  • Container Port Not Exposed in Kubernetes
  • Bluemix volume, root not access and not permission in folder other user in volume bluemix
  • django_1    | Postgres is up - continuing...
    django_1    | python: can't open file 'manage.py': [Errno 2] No such file or directory
    django_1    | python: can't open file 'manage.py': [Errno 2] No such file or directory
    

    Everything seems to be fine though.The daemon is running.

    docker ps

    C:\djangopackages-master>docker ps
    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
    

    docker volume ls

    C:\djangopackages-master>docker volume ls
    DRIVER              VOLUME NAME
    local               djangopackagesmaster_postgres_backup_dev
    local               djangopackagesmaster_postgres_data_dev
    local               ef5505952d82c1472e74e21a8d2921018b2f7ee5570742268c8560335fe5762b
    

    Cant seem to figure out what might be the issue.

    How i built the docker container:
    Ran docker-compose -f dev.yml up after cloning the following repo.
    https://github.com/djangopackages/djangopackages

    Docker Files present for creation:-

    https://github.com/djangopackages/djangopackages/blob/master/compose/caddy/Dockerfile

    https://github.com/djangopackages/djangopackages/blob/master/compose/django/Dockerfile

    https://github.com/djangopackages/djangopackages/blob/master/compose/django/Dockerfile-dev

    https://github.com/djangopackages/djangopackages/blob/master/compose/postgres/Dockerfile

    https://github.com/djangopackages/djangopackages/blob/master/compose/redis/Dockerfile

    In this particular dockerfile

    FROM python:3.6
    
    ENV PYTHONUNBUFFERED 1
    
    # Requirements have to be pulled and installed here, otherwise caching won't work
    COPY ./requirements.txt /requirements.txt
    
    COPY ./manage.py /manage.py
    
    RUN pip install -r /requirements.txt
    
    COPY ./compose/django/entrypoint.sh /entrypoint.sh
    RUN sed -i 's/\r//' /entrypoint.sh
    RUN chmod +x /entrypoint.sh
    
    COPY ./compose/django/start-dev.sh /start-dev.sh
    RUN sed -i 's/\r//' /start-dev.sh
    RUN chmod +x /start-dev.sh
    
    
    WORKDIR /app
    
    ENTRYPOINT ["/entrypoint.sh"]
    

    If I tell to copy manage.py as well then manage.py runs(with errors of course). It seems it is not running the manage.py in the correct path. not sure what to do here anymore.

  • Mysql: forward host lookup failed: Unknown host
  • Docker Compose vs. Dockerfile - which is better?
  • Connecting to Apple's APNS using cURL with HTTP\2 support via nghttp2
  • How to add external my.cnf file to Percona server in Docker?
  • Launch docker container for each user
  • What are the advantages of running jenkins in a docker container
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.