Skip to content

Python guide 4: Invalid port value #21320

@yuto-kimura-g

Description

@yuto-kimura-g

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Information is incorrect

Description

Hello, and thank you for providing such valuable documentation.
As this is my first OSS contribution, I apologize if I make any mistakes.

In the 4. Test your deployment section, which is part of the "Python language-specific guide" chapter, I encountered an issue while following the instructions.
When I copied and pasted the docker-python-kubernetes.yaml, then execute
$ kubectl apply -f docker-python-kubernetes.yaml,
$ curl http://localhost:30001/
locally, there was no output.

Upon checking the CONTAINER ID with
$ docker ps
and using
$ docker top <CONTAINER ID>
I found the following:

$ docker top <CONTAINER ID>
UID                 PID                 PPID                C                   STIME               TTY                 TIME                CMD
10001               7211                7191                0                   08:32               ?                   00:00:00            /bin/sh -c python3 -m uvicorn app:app --host=0.0.0.0 --port=5001
10001               7225                7211                0                   08:32               ?                   00:00:04            python3 -m uvicorn app:app --host=0.0.0.0 --port=5001

After changing the port in docker-python-kubernetes.yaml from 8001 to 5001, everything worked as expected.

$ curl http://localhost:30001/
Hello, Docker!

Location

https://docs.docker.com/guides/python/deploy/

Suggestion

Please consider updating the port number in the docker-python-kubernetes.yaml from 8001 to 5001.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/guideskind/bugBugs. The Cause may not be known at triage time. Consider debugging time for estimateslifecycle/locked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions