From: W. Trevor King Date: Wed, 12 Mar 2014 21:32:30 +0000 (-0700) Subject: Update gentoo-syslog consumers to use tail-syslog X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1d05fa675debbe8f78eec7061a15ac741c4389b0;p=dockerfile.git Update gentoo-syslog consumers to use tail-syslog Folks who just used the stock: CMD rc default && tail -F /var/log/messages can now piggy-back on the CMD setup in the gentoo-syslog Dockerfile.template, so I removed their CMD lines. I updated folks that did fancier things (e.g. tweaking configs before 'rc default') to use 'exec tail-syslog' instead of 'tail -F /var/log/messages'. Folks that are built FROM gentoo-syslog but never used 'rc default' should probably be FROM a more basic image, but I left them alone in this commit. --- diff --git a/buildbot/Dockerfile.template b/buildbot/Dockerfile.template index ccf3ab8..6df4a46 100644 --- a/buildbot/Dockerfile.template +++ b/buildbot/Dockerfile.template @@ -43,6 +43,5 @@ RUN mv /var/lib/buildmaster/master.cfg.sample /var/lib/buildmaster/master.cfg RUN buildslave create-slave /var/lib/buildslave localhost:9989 example-slave pass RUN chown -R buildbot:buildbot /var/lib/buildmaster /var/lib/buildslave -CMD rc default && tail -F /var/log/messages EXPOSE 8010 EXPOSE 9989 diff --git a/elasticsearch/Dockerfile.template b/elasticsearch/Dockerfile.template index 0e68e20..e4ccfe2 100644 --- a/elasticsearch/Dockerfile.template +++ b/elasticsearch/Dockerfile.template @@ -39,5 +39,4 @@ RUN sed -i 's/^\(appender:\)$/\1\n syslog:\n type: syslog\n syslogHost: l # Container networking happens automatically RUN sed -i 's/need net$/use net/' /etc/init.d/* -CMD rc default && tail -F /var/log/messages EXPOSE 9200 diff --git a/irker/Dockerfile.template b/irker/Dockerfile.template index ec8dce7..a82fb17 100644 --- a/irker/Dockerfile.template +++ b/irker/Dockerfile.template @@ -53,5 +53,4 @@ RUN sed -i 's/\(start-stop-daemon --stop --quiet\)/\1 --pidfile ${pidfile}/' /et RUN sed -i 's/#IRKERD_OPTS=""/IRKERD_OPTS="--host 0.0.0.0 --syslog"/' /etc/conf.d/irkerd RUN rc-update add irkerd default -CMD rc default && tail -F /var/log/messages EXPOSE 6659 diff --git a/kibana-azure/Dockerfile.template b/kibana-azure/Dockerfile.template index 49022a9..1057862 100644 --- a/kibana-azure/Dockerfile.template +++ b/kibana-azure/Dockerfile.template @@ -29,5 +29,5 @@ RUN wget https://github.com/wking/kibana/raw/azure-release/kibana-latest.tar.gz RUN tar -xvf kibana-latest.tar.gz --strip-components 1 -C /var/www/localhost/htdocs RUN sed -i 's|"http://"+window.location.hostname+":9200"|"ELASTICSEARCH_URL"|' /var/www/localhost/htdocs/config.js -CMD sed -i "s|ELASTICSEARCH_URL|${ELASTICSEARCH_URL}|" /var/www/localhost/htdocs/config.js && rc default && tail -F /var/log/messages +CMD sed -i "s|ELASTICSEARCH_URL|${ELASTICSEARCH_URL}|" /var/www/localhost/htdocs/config.js && rc default && exec tail-syslog EXPOSE 80 diff --git a/kibana/Dockerfile.template b/kibana/Dockerfile.template index 231b316..ba8aab9 100644 --- a/kibana/Dockerfile.template +++ b/kibana/Dockerfile.template @@ -29,5 +29,5 @@ RUN wget https://download.elasticsearch.org/kibana/kibana/kibana-3.0.0milestone4 RUN tar -xvf kibana-3.0.0milestone4.tar.gz --strip-components 1 -C /var/www/localhost/htdocs RUN sed -i 's|"http://"+window.location.hostname+":9200"|"ELASTICSEARCH_URL"|' /var/www/localhost/htdocs/config.js -CMD sed -i "s|ELASTICSEARCH_URL|${ELASTICSEARCH_URL}|" /var/www/localhost/htdocs/config.js && rc default && tail -F /var/log/messages +CMD sed -i "s|ELASTICSEARCH_URL|${ELASTICSEARCH_URL}|" /var/www/localhost/htdocs/config.js && rc default && exec tail-syslog EXPOSE 80 diff --git a/memcached/Dockerfile.template b/memcached/Dockerfile.template index f983cf1..018224f 100644 --- a/memcached/Dockerfile.template +++ b/memcached/Dockerfile.template @@ -32,5 +32,5 @@ RUN rc-update add memcached default # Container networking happens automatically RUN sed -i 's/need net$/use net/' /etc/init.d/* -CMD sed -i "s/^MEMUSAGE=.*/MEMUSAGE=\"${MEMUSAGE}\"/" /etc/conf.d/memcached && rc default && tail -F /var/log/messages +CMD sed -i "s/^MEMUSAGE=.*/MEMUSAGE=\"${MEMUSAGE}\"/" /etc/conf.d/memcached && rc default && exec tail-syslog EXPOSE 11211 diff --git a/nginx-proxy/Dockerfile.template b/nginx-proxy/Dockerfile.template index dc4ce1d..ea110dc 100644 --- a/nginx-proxy/Dockerfile.template +++ b/nginx-proxy/Dockerfile.template @@ -37,5 +37,5 @@ ADD create-vhosts-from-environment.sh /usr/bin/create-vhosts-from-environment RUN sed -i 's/^\t#\([^ ]\)/\t\1/' /etc/nginx/nginx.conf RUN sed -i 's/listen 127.0.0.1:443;/listen 443 default_server;/' /etc/nginx/nginx.conf -CMD create-vhosts-from-environment && rc default && tail -F /var/log/messages +CMD create-vhosts-from-environment && rc default && exec tail-syslog EXPOSE 443 diff --git a/nginx/Dockerfile.template b/nginx/Dockerfile.template index 53e563e..7ba73a3 100644 --- a/nginx/Dockerfile.template +++ b/nginx/Dockerfile.template @@ -38,5 +38,4 @@ RUN mkdir /var/www/localhost/htdocs # Container networking happens automatically RUN sed -i 's/need net$/use net/' /etc/init.d/* -CMD rc default && tail -F /var/log/messages EXPOSE 80 diff --git a/ngircd/Dockerfile.template b/ngircd/Dockerfile.template index d2ab8b5..5d12009 100644 --- a/ngircd/Dockerfile.template +++ b/ngircd/Dockerfile.template @@ -45,5 +45,5 @@ RUN sed -i 's/Info = Server Info Text/Info = ${INFO}/' /etc/ngircd/ngircd.conf # Container networking happens automatically RUN sed -i 's/need net$/use net/' /etc/init.d/* -CMD setup-ngircd-config-from-environment && rc default && tail -F /var/log/messages +CMD setup-ngircd-config-from-environment && rc default && exec tail-syslog EXPOSE 6667 diff --git a/package-cache/Dockerfile.template b/package-cache/Dockerfile.template index 8cb58c7..d9771fa 100644 --- a/package-cache/Dockerfile.template +++ b/package-cache/Dockerfile.template @@ -40,5 +40,4 @@ Run echo 'PC_GROUP="root"' >> /etc/conf.d/package-cache # Container networking happens automatically RUN sed -i 's/need net$/use net/' /etc/init.d/* -CMD rc default && tail -F /var/log/messages EXPOSE 80 diff --git a/postgresql/Dockerfile.template b/postgresql/Dockerfile.template index d7010dc..c01b264 100644 --- a/postgresql/Dockerfile.template +++ b/postgresql/Dockerfile.template @@ -41,5 +41,4 @@ RUN sed -i "s/\(#log_destination =.*\)/log_destination = 'syslog'\n\1/" /etc/pos # Container networking happens automatically RUN sed -i 's/need net$/use net/' /etc/init.d/* -CMD rc default && tail -F /var/log/messages EXPOSE 5432 diff --git a/redis/Dockerfile.template b/redis/Dockerfile.template index b926fae..2cb2886 100644 --- a/redis/Dockerfile.template +++ b/redis/Dockerfile.template @@ -41,5 +41,4 @@ RUN sed -i 's/\(# maxmemory-policy.*\)/\1\nmaxmemory-policy allkeys-lru/' /etc/r RUN sed -i 's/^\(logfile.*\)/# \1/' /etc/redis.conf RUN sed -i 's/\(# syslog-enabled.*\)/\1\nsyslog-enabled yes/' /etc/redis.conf -CMD rc default && tail -F /var/log/messages EXPOSE 6379 diff --git a/salt-minion/Dockerfile.template b/salt-minion/Dockerfile.template index 6d91498..1f58b6c 100644 --- a/salt-minion/Dockerfile.template +++ b/salt-minion/Dockerfile.template @@ -64,5 +64,4 @@ RUN sed -i 's|^\(#log_level_logfile:.*\)$|\1\nlog_level_logfile: info|' /etc/sal # Container networking happens automatically RUN sed -i 's/need net$/use net/' /etc/init.d/* -CMD rc default && tail -F /var/log/messages EXPOSE 80 diff --git a/stunnel/Dockerfile.template b/stunnel/Dockerfile.template index 2074174..e0d7731 100644 --- a/stunnel/Dockerfile.template +++ b/stunnel/Dockerfile.template @@ -39,5 +39,5 @@ RUN echo 'connect = NETLOC' >> /etc/stunnel/stunnel.conf # Container networking happens automatically RUN sed -i 's/need net$/use net/' /etc/init.d/* -CMD sed -i "s|NETLOC|${SERVER_PORT#tcp://}|" /etc/stunnel/stunnel.conf && rc default && tail -F /var/log/messages +CMD sed -i "s|NETLOC|${SERVER_PORT#tcp://}|" /etc/stunnel/stunnel.conf && rc default && exec tail-syslog EXPOSE 9999