我正在尝试使用大厨食谱实现该命令的功能:
docker run -d --name=nginx --restart=unless-stopped -p 80:80 -p 443:443 -v /etc/test/test.cert:/etc/test/test.cert -v /etc/test/test.key:/etc/test/test.key -v /etc/nginx/conf.d/nginx_ssl_conf.conf:/etc/nginx/conf.d/default.conf --link=rancher-server nginx
这是我到目前为止所提出的。但我仍然无法链接这两个容器:
docker_image 'nginx' do
tag 'latest'
action :pull
end
docker_container 'my_nginx' do
repo 'nginx'
tag 'latest'
port ['80:80', '443:443']
volumes [ '/etc/test/test.cert:/etc/test/test.cert', '/etc/test/test.key:/etc/test/test.key', '/etc/nginx/conf.d/nginx_ssl_conf.conf:/etc/nginx/conf.d/default.conf' ]
links ['rancher-server:nginx']
subscribes :run, 'docker_image[nginx]'
end
有什么想法?建议?