Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge 2: Docker and Flask | Docker for Flask
Docker for Python Developers

bookChallenge 2: Docker and Flask

Task

  • Clone and open the project from the repository;
  • Fill in all '___' gaps in code (in Dockerfile).

    • Use the base Python image version 3.9 "slim" (python:3.9-slim) as it has a smaller footprint, ideal for containers.

    • Set the working directory to /flask-app, where our Flask application will reside.

    • Copy all files from the current directory into the container's working directory.

To check the task, run the command below:

If the command above doesn't work, try inputting this python3 tests/run.py.

  • Build the container:
  • Launch the container (use this command docker run -p 5000:5000 <image_name> ).

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 4

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

Awesome!

Completion rate improved to 5.88

bookChallenge 2: Docker and Flask

Deslize para mostrar o menu

Task

  • Clone and open the project from the repository;
  • Fill in all '___' gaps in code (in Dockerfile).

    • Use the base Python image version 3.9 "slim" (python:3.9-slim) as it has a smaller footprint, ideal for containers.

    • Set the working directory to /flask-app, where our Flask application will reside.

    • Copy all files from the current directory into the container's working directory.

To check the task, run the command below:

If the command above doesn't work, try inputting this python3 tests/run.py.

  • Build the container:
  • Launch the container (use this command docker run -p 5000:5000 <image_name> ).

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 4
some-alt