[英]How do I get my dreamweaver site to use my nginx docker container as a web test server?
I'm new to using docker though I followed the tutorials to create a nginx web server container and I have a website created in Dreamweaver.我是使用 docker 的新手,尽管我按照教程创建了一个 nginx Web 服务器容器,并且我在 Dreamweaver 中创建了一个网站。 I was wanting to know how I can use the virtual web server to host my Dreamweaver site as a test server.
我想知道如何使用虚拟 Web 服务器将我的 Dreamweaver 站点托管为测试服务器。 Can I just open the kitematic and grab a nginx and place my Dreamweaver file into like the 2048 (game) example on there website?
我可以打开 kitematic 并获取 nginx 并将我的 Dreamweaver 文件放入该网站上的 2048(游戏)示例中吗?
This question is pretty broad but in essence you'd want to start with the nginx docker image.这个问题非常广泛,但本质上你想从 nginx docker 镜像开始。 Create a
Dockerfile
that copies and configures your dreamweaver app and use the FROM nginx
directive.创建一个
Dockerfile
来复制和配置您的 Dreamweaver 应用程序并使用FROM nginx
指令。
I think that using a FROM nginx
is a bad idea.我认为使用
FROM nginx
是个坏主意。 NGINX is a service on its own and should run within a docker as a stand-alone. NGINX 本身就是一项服务,应该在 docker 中独立运行。
Your website-docker and your nginx-docker should communicate together using --link <name or id>:alias
.您的网站
--link <name or id>:alias
和您的 nginx- --link <name or id>:alias
应该使用--link <name or id>:alias
。
If you have several websites, you should have several dockers but still only one nginx.如果您有多个网站,则应该有多个 docker 但仍然只有一个 nginx。 So if every websites docker embedded their own nginx that's messy and far away from the best practice...
因此,如果每个网站 docker 都嵌入了自己的 nginx,那就是凌乱且远离最佳实践......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.