Validation failed in API: PortWrongFormat

I have got two machines: - rancher server and host with some docker containers inside - rancher host without any container (only rancher-agent in)

Cloning a container from to it’s giving me the “Validation failed in API: PortWrongFormat” error.

How to debug, fix, solve this?

What version of Rancher are you using?

Are you cloning a service or container?

Also, what do you mean by “cloning a container from host A to Host B”? How are you doing that?

Hi Denise,

i’m using version 0.51.0, cloning a container by into “infrastucture”, standalone containers, down pointing arrow, and clone selection.

I am unable to reproduce.

How are you cloning from Host A to Host B? How do you know that your are making that change?

i’m cloning a container by going into “infrastucture”, “hosts” and selecting a container into “standalone containers” side, and clicking on clone, look below image :slightly_smiling:

Denise, are you there?

Yes, we have been a bit busy with getting v0.56.0 and v0.56.1 out.

I was finally able to reproduce and have filed this Github issue. Is there a reason why you are using standalone containers versus services? Using services (even scale of 1) allows you to leverage a lot more of the Rancher features.

Hi Denise,

thanks for your answer, i’m really glad to receive that.
Anyway i need to understand better; how can i use services?

I create my images from a dockerfile (building) and i use that with a docker-compose.yml.

Can you give me some indications?

Thank you really much.

In order to launch a docker-compose file into Rancher, you’ll need to use rancher-compose. There are many links within the rancher-compose section of the docs page.

You can also read more about the concept of adding services:

Thanks for your answer, but how i can add images to rancher building them from a dockerfile?

This link is in the link I directly sent you.

Also, I mentioned that there are many other sections within the “Rancher-Compose” section of the navigation bar, please try to look at them as they will answer many of your questions.

Here’s one of them that you are asking about.