How to specify first container in rancher exec

In CI I want to run some script inside deployed container. It works only if there is only one container in the service, if more it asks what container to use. Is there a way how to run it in first available container and not ask?

This is log from GitLab CI:

$ rancher exec project-name/web /migrate.sh[0;m
Containers:
[1] helpdesk-master-web-1 (10.42.250.82)
[2] helpdesk-master-web-1 (10.42.27.90)
Select: [1] helpdesk-master-web-1 (10.42.250.82)
[2] helpdesk-master-web-1 (10.42.27.90)
Select: [1] helpdesk-master-web-1 (10.42.250.82)
[2] helpdesk-master-web-1 (10.42.27.90)
Select: [1] helpdesk-master-web-1 (10.42.250.82)
…

Or is there some other elegant way how to remotely execute script inside a container on new version deploy? It does not necessary to run it in the same container what has been just deployed.

What is best practice for DB upgrade scripts?

This is what I have done.
Run rancher command to get the container ID of one container. The xxx-1 has always been available for me.
export CONTAINER_ID=rancher ps -c|grep -i helpdesk-master-web-1|cut -f 1 -d' '

Run the exec command with the container ID from the previous command. You can re-direct you output as needed.
rancher exec -i $CONTAINER_ID sh -c “/migrate.sh 2>&1 |tee /dev/console”