Rancher cli - rancher run command with environment parameter

when run command: rancher run
I find there is no environment parameter (as docker run -e)
I can not add a service to a stack without -e parameter

whether add environment parameter (as docker run -e) to rancher run at next rancher cli version?

@neil_lau24

I’m unsure of your exact problem. In the CLI, if you have more than 1 environment and wish to change you enter the ./rancher config command and it will list all your environments and you can select one.

If you are just trying to add a service to stack that already exist and you are in the correct environment you need to pass in --name and give the stackName/serviceName in the run command.

@neil_lau24 - Yesterday I misunderstood your issue. I though you were asking about environment management and now I think you are asking to add a environment variables to service. I added a issue in github to address this. Here is the issue if you want to track it or comment on it.

https://github.com/rancher/rancher/issues/8589

This is what I think,thank u very much!