Tag: nginx

用nginx构builddocker镜像

我有静态html / AngularJS文件。 我将在docker映像中使用nginx启动web服务器。 我如何从这些html / Js文件build立docker图像并configurationnginx服务器?

将Docker容器中的静态文件复制到非空的已命名卷

我想通过命名卷从Docker容器复制新的静态文件到具有旧静态的nginx容器。 先决条件 : 主机机器目录树 : . ├── data │ ├── bar.2.css │ └── foo.2.js ├── docker-compose.yml ├── Dockerfile Dockerfile : FROM busybox:latest COPY data /data docker-compose.yml : version: '3' services: static: image: 'myimage' volumes: – 'myvolume:/data' nginx: image: 'nginx' volumes: – 'myvolume:/data' volumes: myvolume: 具有旧静态的命名卷myvolume的目录树: . ├── bar.1.css └── foo.1.js 步骤顺序: 使用Dockerfile构buildmyimage : docker build […]

在容器中运行nginx作为具有dynamicconfiguration的反向代理

我正在尝试将nginx设置为容器中的反向代理(Docker Swarm)以及托pipe在Google Cloud Platform和Netlify上的静态网站 我实际上能够在容器中运行nginx,但我真的很担心configuration。 我将如何更新我的网站configuration在Nginx的所有容器(添加/删除位置)? 连接磁盘是存储日志的最佳select吗? 我的架构有错吗? 如果图片无效,请使用此链接 – https://s1.postimg.org/1tv4hka3zz/profitto-architecture_1.png

Nginx反向代理:使用jwilder / nginx-proxy为gitlab容器设置正确的端口

我需要使用一个nginx反向代理。 所以我使用jwilder/nginx-proxy. Also I'm using gitLab as a docker container. So I came up with this docker-compose file, but accessing ci.server.com gives me a jwilder/nginx-proxy. Also I'm using gitLab as a docker container. So I came up with this docker-compose file, but accessing ci.server.com gives me a jwilder/nginx-proxy. Also I'm using gitLab as a docker […]

在监督器中运行docker中的node和nginx

我正在尝试在Docker容器中设置node和nginx,使用supervisor启动和监视这两个进程。 我有一个主pipeconf文件,启动nginx和节点。 问题是,当我尝试使用supervisorctl来访问他们没有find的服务。 所以我认为我一定是做错了什么。 supervisor.conf [supervisord] nodaemon=true [program:nodeServer] directory=/app/backend command=/nodejs/bin/node app.js autostart=true autorestart=unexpected user=www-app startsecs=10 stdout_logfile=/var/log/repositive.io/supervisor.log redirect_stderr=true [program:nginx] command=/usr/sbin/nginx stdout_events_enabled=true stderr_events_enabled=true dockerfile FROM google/debian:wheezy # update and install nginx and supervisor RUN apt-get update -y && \ apt-get install –no-install-recommends -y -q \ curl python build-essential git ca-certificates nginx-extras supervisor # install node RUN mkdir […]

试图在Nginx中运行Django站点时发现500错误的原因

我有一个Django站点,运行在Docker容器中的Nginx服务器,在这里的仓库。 示例回购很好,但是当我添加我的网站,我得到一个500 Internal Server Error 。 所以现在我试图debugging这个(或者find任何关于它的信息)。 我可以login到正在运行的docker实例并查看Nginx的 error.log文件,该文件如下所示: 2015/06/25 18:46:18 [debug] 15#0: epoll add event: fd:8 op:1 ev:00002001 2015/06/25 18:46:24 [debug] 15#0: post event 0000000000A2BDD0 2015/06/25 18:46:24 [debug] 15#0: delete posted event 0000000000A2BDD0 2015/06/25 18:46:24 [debug] 15#0: accept on 0.0.0.0:80, ready: 0 2015/06/25 18:46:24 [debug] 15#0: posix_memalign: 00000000009FB600:256 @16 2015/06/25 18:46:24 [debug] 15#0: *1 […]

Vagrant和NGINX只能在80以外的端口上工作

为了这篇文章的目的,我正在使用Vagrant来启动NGINX(通过Docker,但这并不重要,我不认为)。 我的stream浪者看起来像下面这样: VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| #Assign Box and VM Properties config.vm.box = "ubuntu/trusty64" config.vm.provider "virtualbox" do |v| v.memory = 1024 v.cpus = 2 end # Network config.vm.network "forwarded_port", guest:80, host: 80 #–> DOESN'T WORK localhost config.vm.network "forwarded_port", guest:80, host:8391 #–> WORKS localhost:8391 # Provision config.vm.provision :shell, inline: "sudo apt-get update" config.vm.provision :docker […]

同一networking中的docker集装箱无法到达同一networking中的其他集装箱

我在digital ocean上使用ubuntu 15.10 下面的工程docker network create a docker run -d –name=nginx –net=a nginx docker run -it –net=a –name web node bash apt-get install -yq curl && curl nginx 相反,试图从nginx container到达web container nginx container ,对我来说不起作用。 我进入Web容器: docker exec -it web bash 然后我添加我的index.html文件 然后,我使用http-server通过命令http-server ./ -p 4200 -a 0.0.0.0 index.html来提供index.html文件。 http-server返回: Starting up http-server, serving ./ Available […]

在artifactory中将Docker存储库configuration为子域

我们正在尝试在artifactory版本4.11.1中build立一个docker仓库,以下是设置 — Created a local docker repo – docker-local — Created a virtual dokcer repo – docker-virtual — Created a remote docker repo – docker-hub — Configured docker-local to be the default deployment repo 我们正在使用支持reverse-proxy.company.com和docker-virtual.reverse-proxy.company.com的多域名证书 问题是应该将nginxconfiguration设置为以下 server { listen 80; listen 443; server_name docker-virtual.reverse-proxy.company.com reverse-proxy.company.com; ….. other confug } 有了这个设置,我期望客户连接到虚拟回购 docker push docker-virtual.reverse-proxy.company.com/<my-image> 这是一个有效的设置? 请注意,我们没有通配符证书,它不是一个选项。 […]

集装箱模式的最佳实践

我使用https://hub.docker.com/r/tiangolo/uwsgi-nginx图像docker化Python webapp,该图像使用supervisor来控制uWSGI实例。 我的应用程序实际上需要一个额外的主pipe介导的过程来运行(LibreOffice无头,我通过appy模块生成文档),我想知道什么是适当的模式来实现它。 我看到的方式,我可以扩展上面的图像与额外的主pipeconfiguration我的需要(以及所有必要的操作系统级别的安装步骤),但这将是矛盾的一般原则运行最less量的独特在给定的容器中的进程。 但是,由于我的Python应用程序只能在本地与LibreOffice进行交stream,所以我不确定如何以更集装箱的方式实现它。 感谢您的任何帮助或build议。