Update nginx.pre-install with "mkdir -p /run/nginx" nginx will to start correctly
[ISSUE]
- without "mkdir -p /run/nginx" nginx will fail to start
- / # apk add nginx
- fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
- fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
- (1/2) Installing pcre (8.44-r0)
- (2/2) Installing nginx (1.18.0-r8)
- Executing nginx-1.18.0-r8.pre-install
- Executing busybox-1.32.0-r3.trigger
- OK: 7 MiB in 16 packages
- / # nginx
- nginx: [emerg] open() "/run/nginx/nginx.pid" failed (2: No such file or directory)
[FIX]
- with "mkdir -p /run/nginx" nginx will to start correctly
- / # mkdir -p /run/nginx
- / # apk add nginx
- fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
- fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
- (1/2) Installing pcre (8.44-r0)
- (2/2) Installing nginx (1.18.0-r8)
- Executing nginx-1.18.0-r8.pre-install
- Executing busybox-1.32.0-r3.trigger
- OK: 7 MiB in 16 packages
- / # nginx
- / # nginx -t
- nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
- nginx: configuration file /etc/nginx/nginx.conf test is successful