nginx: fix user id for nginx, remove collectd

single-dockerfile
Trammell Hudson 1 year ago
parent 27dd1a64bd
commit b4ec015e62
  1. 9
      nginx/Dockerfile
  2. 12
      nginx/docker-entrypoint.d/01-collectd.sh

@ -1,14 +1,15 @@
FROM alpine
RUN apk update
RUN echo "building" \
RUN echo "image update" \
&& apk add \
nginx \
collectd \
collectd-nginx \
nginx-mod-http-vts \
gettext \
curl \
openssl \
&& echo "packages installed"
RUN echo "configuring" \
&& mkdir -p \
/etc/nginx/modules-enabled \
/etc/nginx/conf.d \
@ -17,6 +18,8 @@ RUN echo "building" \
# forward request and error logs to docker log collector
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log \
&& sed -i -e 's/nginx:x:101:102/nginx:x:33:33/' '/etc/passwd' \
&& chown -R 33:33 /var/lib/nginx \
&& echo "Done"
COPY ["docker-entrypoint.d/*", "/docker-entrypoint.d/" ]

@ -1,12 +0,0 @@
#!/bin/sh -x
touch /started
#cat >> /etc/collectd/collectd.conf <<EOF
cat /etc/collectd/collectd.conf - > /tmp/conf <<EOF
LoadPlugin nginx
<Plugin "nginx">
URL "http://localhost:80/nginx_status"
</Plugin>
EOF
#collectd
Loading…
Cancel
Save