[英]docker-entrypoint exec nginx not found
I'm not sure what I'm doing is correct so fix me if I'm mistaken.我不确定我在做什么是正确的,如果我弄错了,请纠正我。
This is my dockerfile:这是我的 dockerfile:
FROM nginx:latest
RUN apt update && apt install build-essential libpcre3 libpcre3-dev libssl-dev libnginx-mod-rtmp -y
I'm trying to add rtmp module
to my nginx.我正在尝试将
rtmp module
添加到我的 nginx 中。
I'm trying to run the image with the command below:我正在尝试使用以下命令运行图像:
docker run --rm --name mynginx -p 80:80 -v ~/nginx/conf/nginx.conf:/etc/nginx/nginx.conf mynginx:latest
This is what I received:这是我收到的:
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
/docker-entrypoint.sh: 38: exec: nginx: not found
What is that /docker-entrypoint.sh: 38: exec: nginx: not found
?那
/docker-entrypoint.sh: 38: exec: nginx: not found
是什么? How do I fix it?我如何解决它?
There is already an nginx image with rtmp module installed:已经有一个安装了 rtmp 模块的 nginx 图像:
docker pull tiangolo/nginx-rtmp
How to use:如何使用:
https://hub.docker.com/r/tiangolo/nginx-rtmp/ https://hub.docker.com/r/tiangolo/nginx-rtmp/
Now for your problem, if you go to the official nginx docker image repository in https://github.com/nginxinc/docker-nginx , line 38 is: Now for your problem, if you go to the official nginx docker image repository in https://github.com/nginxinc/docker-nginx , line 38 is:
exec "$@"
So what does that do?那有什么作用呢?
More information here:更多信息在这里:
https://unix.stackexchange.com/questions/466999/what-does-exec-do https://unix.stackexchange.com/questions/466999/what-does-exec-do
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.