我正在尝试通过elasticbeanstalk在Docker容器中将.net asp Web api应用程序部署到Amazon,但这是我得到的:
ERROR: Failed to start nginx, abort deployment ERROR: [Instance: i-ecf0d365] Command failed on instance. Return code: 1 Output: nginx: [emerg] invalid host in upstream "172.17.0.2:5000/tcp" in /etc/nginx/conf.d/elasticbeanstalk-nginx-docker-upstream.conf:2 nginx: configuration file /etc/nginx/nginx.conf test failed
图片在这里:https : //hub.docker.com/r/wedkarz/awsm8-api/
FROM microsoft/aspnet:latest COPY . /app WORKDIR /app RUN ["dnu", "restore"] EXPOSE 5000/tcp ENTRYPOINT ["dnx", "-p", "project.json", "web"]
upstream docker { server 172.17.0.2:5000/tcp; keepalive 256; }
Richard Smit.. 7
错误消息nginx: [emerg] invalid host in upstream "172.17.0.2:5000/tcp"
显示一个upstream server
参数,/tcp
端口号后面带有虚假字符。请参阅上游模块文档。
@Fishman确认错误参数出现在内nginx
的配置文件,并且从生成的Dockerfile这个文件,并且该问题通过改变的值校正EXPOSE
参数从(所述Dockerfile内)5000/tcp
到5000
。
错误消息nginx: [emerg] invalid host in upstream "172.17.0.2:5000/tcp"
显示一个upstream server
参数,/tcp
端口号后面带有虚假字符。请参阅上游模块文档。
@Fishman确认错误参数出现在内nginx
的配置文件,并且从生成的Dockerfile这个文件,并且该问题通过改变的值校正EXPOSE
参数从(所述Dockerfile内)5000/tcp
到5000
。