Tag: nginx

牧场主伙伴php-fpm端口映射

我正在使用这个docker工合成牧场主: version: '2' volumes: data: {} services: web: image: nginx:latest volumes: – /some_local_dir/services.conf:/etc/nginx/conf.d/site.conf volumes_from: – my-service ports: – 9082:80 labels: io.rancher.sidekicks: my-service my-service: image: my-service volumes: – my-service:/my-service ports: – 9001:9000 我的服务 – 是build立在alpine3.6上的图像,安装了php7-fpm 我的services.conf是: server { root /my-service/web; server_name my-service.local; location / { try_files $uri /app.php$is_args$args; } location ~ ^/app\.php(/|$) { fastcgi_pass my-service.web:9001; fastcgi_split_path_info […]

每秒OSRM /后端docker可以处理多less个请求?

如果我托pipe在我们自己的服务器上,是否有下面的API可以处理每秒请求的限制? http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true 我完成了https://hub.docker.com/r/osrm/osrm-backend/链接中提到的内容来运行OSRM docker指令。 (注意我没有使用前端) 一切似乎工作正常,即使我执行以下的API(注意这里的源极限是3) http://127.0.0.1:5000/table/v1/driving/79.865184,6.856469;79.867051,6.858589;79.862052,6.860068;79.863039 ,6.862401源= 1; 2; 3&目的地= 0 我得到了44毫秒的回应。 但是,如果我在上面的API中增加50个源信息,每秒发送1000个请求,我得到7到8秒的响应时间,CPU使用率为60-70。 这是我的服务器和OSRM文件大小信息: map.osrm文件大小:1.6GB 16核心CPU 24GB内存 ulimit -n 1024 我也尝试过Nginx的负载均衡,下面简单介绍一下: docker run -t -i -p 5000:5000 -v $(pwd):/ data osrm / osrm-backend osrm-routed –algorithm mld /data/map.osrm docker run -t -i -p 5001:5000 – v $(pwd):/ data osrm / osrm-backend osrm-routed –algorithm mld /data/map.osrm […]

Nginx docker只能在docker-compose上find容器

我不知道如果这是正确的,但我有一个容器上的代理请求到一个Nodejs应用程序的一个nginx和一切都工作正常的Nodejs docker-compose文件与依赖function和所有。 但是现在我想将它们分离成不同的docker撰写文件,然后碰巧nginx找不到上游nodejsapp : 2017/11/10 15:21:38 [emerg] 1#1: host not found in upstream "nodejsapp" in /etc/nginx/conf.d/default.nodejsapp.conf:8 nginx: [emerg] host not found in upstream "nodejsapp" in /etc/nginx/conf.d/default.nodejsapp.conf:8 我的configuration代理的东西的作品,但无论如何是: server { listen 80; location / { proxy_pass http://nodejsapp:4000; proxy_set_header X-Remote-Addr $proxy_add_x_forwarded_for; proxy_cache STATIC; proxy_cache_valid 200 1d; proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; proxy_ignore_headers X-Accel-Expires Expires Cache-Control; […]

Nginx的docker容器将不会代理Web应用程序容器

我有一个Docker容器,运行一个Web应用程序和一个运行Nginx的docker容器:ubuntu。 Web应用程序容器运行在端口:3000上,暴露于外部(浏览器连接到主机的端口:3000端口访问应用程序) Nginx容器运行在80端口,可以通过浏览器连接到主机的ip访问 Nginx容器和Web应用都连接到相同的Docker网桥。 我可以在它的内部IP(172.21.0.2)上docker exec -it(nginx)bash和ping(web-app),反之亦然。 我也可以从两个容器外使用nmap,看到(nginx)的内部IP为80开放端口,应用程序的开放端口为3000。 什么不坏: Nginx安装正确,但可能configuration不正确。 networking应用程序很实用,不幸的是无法重新configuration以适应Nginx。 我曾经尝试过: 通过docker-compose.yml,dockerfile,一个空容器> bash和手动apt-get安装nginx来安装nginx。 由于应用程序图像的细节(图像实际上是一个node.js容器并具有应用程序的子服务),因此我不能在一个docker-compose文件中包含Web应用程序和nginx(并修复networking问题)试图在一个docker-compose.yml中包含这两个服务只是导致撰写创buildnginx和一个无应用程序的node.js容器。 我想做什么: 仅通过dockerfile和docker run命令创build一个nginx容器(以支持可伸缩性),通过它们都连接的dockernetworking来代理已经运行的应用容器。 我希望nginx能够在80端口上收听,并把它发送到3000端口的容器。我感到困惑的是: 在nginx.conf文件中,是否将其路由到容器的内部IP为172.21.0.2:3000,(hostIP):3000,Localhost:3000或0.0.0.0:3000? 我的文件如下: Dockerfile: FROM xqdocker/ubuntu-nginx COPY nginx.conf /etc/nginx/nginx.conf ##.confd IS LOCAL TO DOCKERFILE nginx.conf: worker_processes 1; events { worker_connections 1024; } http { sendfile on; upstream docker-nginx { server 172.21.0.2:3000; #WHAT DO I PUT HERE?? } […]

jenkins背后nginx反向代理

我试图让一个jenkins容器(docker)在nginx反向代理的后面。 对于https://example.com/这个path,它可以正常工作,但是当我将参数添加到pathhttps://example.com/jenkins时,它会返回502 Bad Gateway。 jenkins的docker容器像这个docker容器运行-d -p 127.0.0.1:8080:8080 jenkins / jenkins 这是我的代码, server { listen 80; root /var/www/html; server_name schoolcloudy.com www.schoolcloudy.com; location / { proxy_pass http://localhost:8000; } } # Virtual Host configuration for example.com upstream jenkins { server 127.0.0.1:8080; } server { listen 80; server_name jenkins; location /jenkins { proxy_pass http://jenkins; proxy_redirect 127.0.0.1:8080 https://schoolcloudy.com/jenkins; } }

是否有可能在我们自己的服务器上configurationdocker映像签名与私有dockerregistry? Docker镜像签署付费服务?

我是新来的docker.I遵循部署registry服务器后的步骤。 我试图设置一个私人dockerregistry在服务器上使用nginx,我可以设置它,但我不知道如何设置图像签名与私人服务器。 根据我对Docker映像签名的理解,我们需要configurationDocker Trusted Registry(DTR)。 DTR附带内置的公证书,以便您可以使用Docker Content Trust签署和validation图像。 任何提示或技巧或参考url来解决这个问题? 提前致谢! 🙂

由于“任务:非零退出(1)”错误,Docker容器无法启动

我正在尝试在Amazon AWS Docker实例上与pimcore实例一起设置nginx代理。 这是我的撰写文件: version: '3.4' services: nginx-proxy: image: codesuki/ecs-nginx-proxy ports: – "80:80" pimcore-jcii: image: ****/pimcore5:current ports: – "8000:80" links: – "db" volumes: – efs-storage:/data db: image: mariadb restart: always ports: – "3306:3306" volumes: efs-storage: driver: cloudstor:aws driver_opts: backing: shared 如果我部署这个堆栈,nginx代理容器不能启动。 它出现以下错误信息: task: non-zero exit (1) 我有“docker inspect”的错误信息。 我究竟做错了什么? 或者我可以在哪里收集有关集装箱状态的更多信息?

获取警告:nginx:无法打开监督/ ok:文件不存在

这是我的Dockerfile: #Docker file with Alpine + nginx as base image FROM docker-alpine #adding the runit setting of nginx to /etc/service ADD ./conf/nginx.runit /etc/service/nginx/run RUN apk update && \ apk upgrade && \ apk add –update \ runit \ nginx \ curl #create necessary dir #create users #remove cache RUN mkdir /etc/nginx/sites-enabled && \ adduser -u […]

错误docker工具:无效的参考格式。 当执行docker运行

完整的命令是 docker run –name mynginx2 -v /var/www:/usr/share/nginx/html:ro \ -v /var/nginx/conf:/etc/nginx:ro -P -d nginx 为什么它不工作? 我在这里find它https://blog.docker.com/2015/04/tips-for-deploying-nginx-official-image-with-docker/ 谢谢

将现有docker集装箱导入openshift

我有大约14个容器,其中大部分是Java应用程序,我有一个nginx容器。 我做一个docker创buildnetworking,并build立和运行在同一个networking下。 然后,我暴露了我的nginx容器8080,去到:8080 /资源/公共/客户端/networking/ index.html,我有我的应用程序在那里运行。 我已经将这些容器导入了一个项目中的openshift,并且我已经成功了。 但是当我在nginx服务器上打开8080的路由时,我得到一个Welcome to Nginxlogin页面。 当我添加path/resources/public/client/web/index.html它不会打开任何东西。 如何在Openshift中将这些容器连接在一起? 我正在寻找一些指导。 使用Docker创buildnetworking相当容易。