Docker : exec /usr/local/bin/python: input/output error

Hi ! Please, I need your help !

When I use the command : docker run -it dc_hello, which is my image docker builded. I receive the error message such as : exec /usr/local/bin/python: input/output error.

Bellow my files:

  1. hello.py
    print("Ola, os proramadores Python")

  2. Dockerfile:

    FROM python:3 
    COPY .  /app
    WORKDIR /app
    CMD ["python", "hello.py"]
    

It worked for me.

We usually need the following information to understand the issue:

  1. What platform are you using? Windows, Linux or macOS? Which version of the operating systems? In case of Linux, which distribution?

  2. How did you install Docker? Sharing the platform almost answers it, but only almost. Direct links to the followed guide can be useful.

  3. On debian based Linux, the following commands can give us some idea and recognize incorrectly installed Docker:

    docker info
    docker version
    

    Review the output before sharing and remove confidential data if any appears (public IP for example)

    dpkg -l | grep docker
    snap list docker
    

    When you share the outputs, always format your posts according to the following guide: How to format your forum posts

Hi !

About:

  1. I am using windows 10 platform
  2. I installed Docker desktop normally

Thanks |

And which version of Docker Desktop? That error should not happen unless there is a bug In Docker Desktop or a Windows-specific behavior I don’t know about.

Note:: When you add new information, please don’t create new topics. I will keep deleting those. I assume the topics were created acidentally. Edit your existing posts if needed, or write your message after cicking the “Reply” button at the bottom of the message you are replying to. Create a new topic only when you have a new, different issue. Thank you!

Hello !

The docker version is 4.28.0 (139021),
Engine: 25.0.3,
Compose: v2.24.6-desktop.1,
Credential Helper: v0.8.1,
Kubernetes: v1.29.1.

"Did I do the Docker Desktop installation incorrectly? Could you please indicate the steps to follow? Something seems amiss, but I can’t quite figure it out. Please help me.

Thanks