Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

260
Visualizações
Dockerized Django On Ubuntu

I am using:

  1. Ubuntu 16.04.
  2. Docker version 1.12.6.

I want to containerize my existing Django app., knowing that everything goes well in this app. => no bugs, no errors...

My Dockerfile:

FROM django

ADD . /BackendServer

WORKDIR /BackendServer

RUN pip install -r requirements.txt

CMD [ "python", "BackendServer/manage.py runserver 0.0.0.0:8000" ]

requirements.txt

djangorestframework
gunicorn

Now everything goes well, except the last line when executing the manage.py python, it says: "python: can't open file 'BackendServer/manage.py runserver 0.0.0.0:8000': [Errno 2] No such file or directory".

So, I execute the following command: "sudo docker run backendserver ./BackendServer/manage.py runserver 0.0.0.0:8000"

I got no errors and still the server is not running!! errors screen

What shall I do so that I can access the django server !? Please help!!

Additional note: here is the execution of "ls BackendServer" in the container.

thanks in advance!

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You have already changed the directory into /BackendServer.

Use this instead:

CMD [ "python", "./manage.py runserver 0.0.0.0:8000" ]

Also note that docker run executes without a tty by default, which will suppress the output. Run with -it to use interactive terminal.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda