我在一个全新的Ubuntu14.04.2上有一个名为test.sh的脚本,它可以这样做:
#!/bin/sh
set -o errexit
# Start by building the box
docker build -t dcyclebox-test .
# Test nginx
docker run dcyclebox-test bash -c 'nginx -v' && echo '[test] nginx works'
echo '[status] end of test script'
nginx命令不存在,因
我在一个共享主机上,有权继承nginx根安装并重写它的配置文件(注意:我不想在我的主目录中编译我自己的nginx )。
我编写了一个开始/重新加载/停止脚本,这个脚本工作得很好,但是我一直在下面看到错误
启动脚本
#!/bin/bash
# Set this to your nginx configuration file and PID
CONFIG=~/nginx/nginx.conf
PIDFILE=~/nginx/nginx.pid
# Do not change anything below unless you know what you do
DAEMON=/usr/l
我正在编写一个Nginx配置,它使用一些Nginx变量作为参数来调用perl脚本,并向脚本返回一个值,就好像Nginx.conf是这个perl脚本的主变量一样。我已经在Nginx上启用了perl模块,并从nginx配置成功运行了helloworld。作为perl的新手,你能帮我找出哪里出了问题吗这是我的test.pm
#!/usr/bin/perl
sub function {
my $r = shift;
my $foo = $r->variable('foo');
print $foo;
}
这就是我在Nginx.conf上调用它的方式
s
下面是我的(PowerShell-script):entrypoint.ps1
Set-Location -Path C:\nginx
& "C:\nginx\Configure-Nginx.ps1"
& "C:\nginx\nginx.exe"
我需要我的Configure-Nginx.ps1和node.exe是在docker run上执行的,所以我在Dockerfile上放置了一个入口点
FROM nginx
# nginx is a custom image that's based on mcr.microsoft.com/wi