# Worked docker-compose.yml does not work in rancher

**URL:** <https://forums.suse.com/t/worked-docker-compose-yml-does-not-work-in-rancher/8092>\
**Category:** Rancher 1.x\
**Created:** [December 22, 2017, 5:54am UTC](https://forums.suse.com/t/worked-docker-compose-yml-does-not-work-in-rancher/8092 "2017-12-22T05:54:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![donnielee](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/donnielee/32/3151_2.png) [@donnielee](https://forums.suse.com/u/donnielee)\
**Post date:** [December 22, 2017, 5:54am UTC](https://forums.suse.com/t/worked-docker-compose-yml-does-not-work-in-rancher/8092/1 "2017-12-22T05:54:37Z")

</div>

docker-compose.yml, which worked well in docker-compose does not work.

First, my chef-browser container cannot connect to chef-server. You need to change chef-server’s container name to chef-server, because which is embedded in chef-browser settings.rb file in chef-browser/features/fixtures/settings.rb.  
Second, I cannot access containers either through rancher UI{execute shell) or docker exec.  
Third, I cannot access chef-browser container through managed IP address.

Below is the docker-compose.yml file content.

version: '2’  
services:  
chef-server:  
image: carendache/chefserver\_chef-server  
command: /usr/local/bin/run.sh  
volumes:  
- chef-server:/var/opt/opscode  
- chef-server-certificate:/etc/chef  
networks:  
- default  
ports:  
- 443:443  
privileged: true  
tty: true  
stdin\_open: true

chef-browser:  
image: carendache/chefserver\_chef-browser  
networks:  
- default  
ports:  
- 8082:9292  
volumes:  
- chef-server-certificate:/opt/chef-browser/features/fixtures  
tty: true  
stdin\_open: true

volumes:  
chef-server:  
chef-server-certificate:

networks:  
default:  
driver: bridge

---

<div class="post-metadata">

**Author:** ![superseb](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/superseb/32/2424_2.png) [@superseb](https://forums.suse.com/u/superseb)\
**Post date:** [December 22, 2017, 2:01pm UTC](https://forums.suse.com/t/worked-docker-compose-yml-does-not-work-in-rancher/8092/2 "2017-12-22T14:01:50Z")

</div>

Name of the service is `chef-server`, which is the same name resolving which is used by Docker. What did you change it from? What errors are you getting when executing `docker exec` (as this will be the same cause as using the UI).

Also what Rancher version, OS version and Docker version are you using?

---

<div class="post-metadata">

**Author:** ![donnielee](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/donnielee/32/3151_2.png) [@donnielee](https://forums.suse.com/u/donnielee)\
**Post date:** [December 24, 2017, 12:47pm UTC](https://forums.suse.com/t/worked-docker-compose-yml-does-not-work-in-rancher/8092/3 "2017-12-24T12:47:11Z")

</div>

I could narrow down the problem. chef-server does not come up with nginx 443 port. It seems that /usr/local/bin/configure\_chef.sh, which should be executed via command: /usr/local/bin/run.sh([https://github.com/donnielee/chef-server/blob/master/run.sh](https://github.com/donnielee/chef-server/blob/master/run.sh)) does not seems to execute. So I accessed the chef-server container and manually executed it. Then it worked. Whereas when I run this docker-compose.yml in docker-compose, there was not such a problem.

Some of the problems I experienced such as not accessing container seem to be related with my company’s private cloud firewalls. As I launched rancher on macbook, it worked pretty well and I could access the container through rancher web UI.

I changed chef-server container name from chefserver\_chef-server-1 to chef-server, which is embedded in chef-browser’s settings.rb file.  
And, finally my rancher is v1.6.13. Currently I am using rancher vagrant from [https://github.com/rancher/vagrant](https://github.com/rancher/vagrant).

Thank you so much.
