New port assigned to nuclio container after reset docker

Hello, after deploy nuclio functions has a next node ports:

user@user-pc:~$ nuctl get functions
 NAMESPACE | NAME                           | PROJECT | STATE     | REPLICAS | NODE PORT
 nuclio    | pth-facebookresearch-sam-vit-h | cvat    | unhealthy | 1/1      | 54174
 nuclio    | pth-foolwood-siammask          | cvat    | unhealthy | 1/1      | 54121

After deploy , docker assigns them the same ports : 54174 and 54121 and functions works ok.
But if i restart docker desktop, container assigned new ports different from the original ones, but nuclio functions works on old ports .

what is the right thing to do in this case with the port in order to maintain functionality and avoid new ports when rebooting?
Thanks.

I can’t help with ncilo as I don’t know it, but if you don’t specify the host port, only the target port in the container, the host port will be random.

Where i can set host port if i use windows docker desktop ? config file ?

But again, I have no iddea what nuclio does and what config it needs.

How can i get or modify docker desktop parameters/start container command? Where i can find autostart option ?

I guess the container is started through the Docker Desktop UI → images → “play” icon.
There is a ^ icon at the end of the “Optional settings”, which expands a section below it.

Note: If the Dockerfile of the image declares one or more port via EXPOSE, you will be able to map a host port against the detected container port. If the Dockerfile of the image does not declare one or more port via EXPOSE, you will not be able to do so. Then the only option is to use the command line due to how the image is created.

I tried to tell you that it doesn’t seem to be a Docker issue. You didn’t share how you created the container (we didn’t ask for it yet either), but when I saw the nuclio command I assumed there was a nuclio command to start the containers. And we can’t help with nuclio issues if we don’t know Nuclio. I searched for it and found this

https://docs.nuclio.io/en/stable/setup/docker/getting-started-docker.html#getting-started-with-nuclio-on-docker

Which starts a dashboard. And you can create functions on the dashboard. Which creates a container with a random port. I have no idea how it should be set correctly, but if it is not on the dashboard, maybe the configuration reference can help

https://docs.nuclio.io/en/stable/reference/function-configuration/function-configuration-reference.html

This is why I thought it didn’t

Since it is a user-pc, I guessed the nuclio cli started the containers. If it was the CLI or the dashboard, it is not a Docker configuration issue.