nginx-rtmp-module icon indicating copy to clipboard operation
nginx-rtmp-module copied to clipboard

Dockerfile in Wiki Error

Open hoodsy opened this issue 6 years ago • 4 comments

I get this error after compiling the Dockerfile listed in the wiki:

2018/04/30 19:59:12 [emerg] 1#1: module "ngx_rtmp_module" is already loaded in /etc/nginx/modules-enabled/50-mod-rtmp.conf:1 nginx: [emerg] module "ngx_rtmp_module" is already loaded in /etc/nginx/modules-enabled/50-mod-rtmp.conf:1

hoodsy avatar Apr 30 '18 20:04 hoodsy

Seems like module is built directly into nginx in that example, but /etc/nginx/modules-enabled/50-mod-rtmp.conf file is created anyway for some reason. Just add that step to your dockerfile:

RUN rm /etc/nginx/modules-enabled/50-mod-rtmp.conf

Keep in mind this is only a temporary solution and this would need a proper fix, but I'm not very proficient with nginx buildsystem.

Informatic avatar May 27 '18 11:05 Informatic

Same happened to me. Why do we have to compile nginx in the first place? Can't we get ngx_rtmp_module as a compiled package?

BrightSoul avatar Sep 17 '19 10:09 BrightSoul

Seems like module is built directly into nginx in that example, but /etc/nginx/modules-enabled/50-mod-rtmp.conf file is created anyway for some reason. Just add that step to your dockerfile:

RUN rm /etc/nginx/modules-enabled/50-mod-rtmp.conf

Keep in mind this is only a temporary solution and this would need a proper fix, but I'm not very proficient with nginx buildsystem.

There is 22 lines of run commands, can you specify which command should be followed by this one?

VityaSchel avatar Jan 01 '22 10:01 VityaSchel

Add it after the last RUN command in that file.

Informatic avatar Jan 01 '22 10:01 Informatic