我不确定我所做的是正确的,所以如果我错了,请纠正我。
这是我的dockerfile:
FROM nginx:latest
RUN apt update && apt install build-essential libpcre3 libpcre3-dev libssl-dev libnginx-mod-rtmp -y 我正在尝试将rtmp module添加到我的nginx中。
我正在尝试使用以下命令运行镜像:
docker run --rm --name mynginx -p 80:80 -v ~/nginx/conf/nginx.conf:/etc/nginx/nginx.conf mynginx:latest这是我收到的:
/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那是什么/docker-entrypoint.sh: 38: exec: nginx: not found?我该如何修复它?
发布于 2021-02-02 21:22:29
已经有安装了rtmp模块的nginx镜像:
docker pull tiangolo/nginx-rtmp使用方法:
https://hub.docker.com/r/tiangolo/nginx-rtmp/
现在,对于您的问题,如果您转到https://github.com/nginxinc/docker-nginx中的官方nginx docker镜像存储库,第38行是:
exec "$@"那么这是做什么的呢?
更多信息请点击此处:
https://unix.stackexchange.com/questions/466999/what-does-exec-do
https://stackoverflow.com/questions/66010212
复制相似问题