[英]How do I configure Nginx Proxy Manager to proxy an OnlyOffice Document Server Docker container?
[英]I am trying to configure nginx as proxy server but getting an error while composing docker file
我正在尝试将Nginx配置为代理服务器,但出现错误。 我在工作中创建了以下文件。
DockerFile
FROM nginx:1.10.1-alpine
RUN rm /etc/nginx/conf.d/*
COPY proxy.conf /etc/nginx/conf.d/
Proxy.config
server {
listen 80;
location / {
proxy_pass http://app;
}
}
泊坞窗,compose.yml
version: '2'
services:
app:
build: app
proxy:
build: proxy
ports:
- "80:80"
当我构建docker-compose文件时,出现以下错误:
Puja:Docker pujadudhat$ docker-compose build
Building app
Step 1/2 : FROM nginx:1.10.1-alpine
---> 2cd900f340dd
Step 2/2 : COPY index.html /usr/share/nginx/html
---> Using cache
---> 9d105a18fb9d
Successfully built 9d105a18fb9d
Building proxy
Step 1/3 : FROM nginx:1.10.1-alpine
---> 2cd900f340dd
Step 2/3 : RUN rm /etc/nginx/conf.d/*
---> Using cache
---> a4e1efc3f050
Step 3/3 : COPY proxy.conf /etc/nginx/conf.d/
ERROR: Service 'proxy' failed to build: lstat proxy.conf: no such file or directory
我收到此错误“服务'proxy'无法构建:lstat proxy.conf:没有这样的文件或目录。有人可以帮助我解决吗?谢谢。
看起来您在构建Docker容器的项目中缺少proxy.conf。 看起来您将其命名为Proxy.conf ,并且应将其命名为proxy.conf 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.