[英]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.