# Container Scheduling not work

**URL:** <https://forums.suse.com/t/container-scheduling-not-work/1307>\
**Category:** Rancher 1.x\
**Created:** [December 21, 2015, 2:51am UTC](https://forums.suse.com/t/container-scheduling-not-work/1307 "2015-12-21T02:51:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vickiyan](https://avatars.discourse-cdn.com/v4/letter/v/7c8e57/32.png) [@vickiyan](https://forums.suse.com/u/vickiyan)\
**Post date:** [December 21, 2015, 2:51am UTC](https://forums.suse.com/t/container-scheduling-not-work/1307/1 "2015-12-21T02:51:06Z")

</div>

Hi ,  
I want to use Docker Run command to start a container on another docker host with label storage set to ssd, so I followed the steps in below link:-  
[http://docs.rancher.com/rancher/concepts/scheduling/](http://docs.rancher.com/rancher/concepts/scheduling/)

the command is like:-  
docker run -l io.rancher.container.network=true -l “io.rancher.scheduler.affinity:host\_label: storage=ssd” -itd mariadb bash

However, I found the container was still created on the docker host where I run the Docker Run Command, instead of the one with the storage label.

From the Rancher UI–\>Add container, the scheduling affinity could work.

Is there anything wrong with my steps or understanding? Pls help.

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [December 21, 2015, 3:28am UTC](https://forums.suse.com/t/container-scheduling-not-work/1307/2 "2015-12-21T03:28:20Z")

</div>

There is no scheduling when you do `docker run`. You’re physically starting a container on that host, and Rancher only finds out about it after the fact and “imports” it to show on the host it was already started on.

Services and using rancher-compose will start containers according to the scheduling labels.

---

<div class="post-metadata">

**Author:** ![vickiyan](https://avatars.discourse-cdn.com/v4/letter/v/7c8e57/32.png) [@vickiyan](https://forums.suse.com/u/vickiyan)\
**Post date:** [December 21, 2015, 3:31am UTC](https://forums.suse.com/t/container-scheduling-not-work/1307/3 "2015-12-21T03:31:34Z")

</div>

Got it, thanks for your prompt response:).
