Worked docker-compose.yml does not work in rancher

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

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?

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) 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.

Thank you so much.