Cannot Start Django in Docker

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

I am getting the following:-

  • Cannot connect to SQL Server from a Docker container
  • How to access to a file in docker container already exit?
  • How to run Docker on Ubuntu 15.04?
  • Close Docker expose port from parent file
  • Dockerfile with node, java, and Dynamodblocal
  • what's the best way to let kubenetes pods communicate with each other?
  • 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.

  • Why would I need to run docker privileged to access host log4j2.yaml
  • How can i force remove a docker container using 'docker_container' module of Ansible?
  • How to run bash function in Dockerfile
  • Starting a container only after the previous container is Running
  • Issue while installing Mariadb on mcp8 through Docker
  • Docker cp Path not specified
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.