From: W. Trevor King Date: Fri, 18 Jul 2014 20:18:54 +0000 (-0700) Subject: Drop 'need' -> 'use net' sedding, now that gentoo-openrc handles it X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e7ac4f7989181708ee6dab599f582bdce1492256;p=dockerfile.git Drop 'need' -> 'use net' sedding, now that gentoo-openrc handles it With: rc_provide="... net" OpenRC understands that it's not responsible for filling the net dependency, so there's no need to tweak the scripts themselves. --- diff --git a/buildbot/Dockerfile.template b/buildbot/Dockerfile.template index 6df4a46..b0e278b 100644 --- a/buildbot/Dockerfile.template +++ b/buildbot/Dockerfile.template @@ -35,9 +35,6 @@ RUN eselect news read new RUN rc-update add buildmaster default RUN rc-update add buildslave default -# Container networking happens automatically -RUN sed -i 's/need net$/use net/' /etc/init.d/* - RUN buildbot create-master /var/lib/buildmaster 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 diff --git a/docker-registry/Dockerfile.template b/docker-registry/Dockerfile.template index 73c6c45..5efbe43 100644 --- a/docker-registry/Dockerfile.template +++ b/docker-registry/Dockerfile.template @@ -35,8 +35,5 @@ RUN eselect news read new RUN git clone git://github.com/dotcloud/docker-registry.git RUN cp --no-clobber docker-registry/config/config_sample.yml docker-registry/config/config.yml -# Container networking happens automatically -RUN sed -i 's/need net$/use net/' /etc/init.d/* - CMD cd docker-registry && ./setup-configs.sh && ./run.sh --preload EXPOSE 5000 diff --git a/elasticsearch/Dockerfile.template b/elasticsearch/Dockerfile.template index e4ccfe2..8657cc7 100644 --- a/elasticsearch/Dockerfile.template +++ b/elasticsearch/Dockerfile.template @@ -36,7 +36,4 @@ RUN sed -i 's/^\(source src { system(); internal();\) };$/\1 udp(ip(127.0.0.1) p RUN sed -i 's/^\(rootLogger: .*\), file$/\1, syslog/' /etc/elasticsearch/logging.yml RUN sed -i 's/^\(appender:\)$/\1\n syslog:\n type: syslog\n syslogHost: localhost:514\n facility: daemon\n laout:\n type: pattern\n conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"\n/' /etc/elasticsearch/logging.yml -# Container networking happens automatically -RUN sed -i 's/need net$/use net/' /etc/init.d/* - EXPOSE 9200 diff --git a/hubot/Dockerfile.template b/hubot/Dockerfile.template index 28537b6..c77914c 100644 --- a/hubot/Dockerfile.template +++ b/hubot/Dockerfile.template @@ -61,9 +61,6 @@ RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1 "connect_router": RUN cd hubot && npm install RUN git clone git://github.com/jenrzzz/hubot-logger.git && cp hubot-logger/logger.coffee hubot/node_modules/hubot-scripts/src/scripts/ -# Container networking happens automatically -RUN sed -i 's/need net$/use net/' /etc/init.d/* - CMD cd hubot && REDIS_URL="${REDIS_PORT}" LOG_REDIS_URL="${REDIS_PORT}" PORT=80 exec bin/hubot --name "${HUBOT_IRC_NICK:-hubot}" -a irc EXPOSE 80 EXPOSE 8000 diff --git a/memcached/Dockerfile.template b/memcached/Dockerfile.template index 018224f..2841982 100644 --- a/memcached/Dockerfile.template +++ b/memcached/Dockerfile.template @@ -29,8 +29,5 @@ RUN emerge -v net-misc/memcached RUN eselect news read new 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 && exec tail-syslog EXPOSE 11211 diff --git a/nginx/Dockerfile.template b/nginx/Dockerfile.template index 7ba73a3..b3c8825 100644 --- a/nginx/Dockerfile.template +++ b/nginx/Dockerfile.template @@ -35,7 +35,4 @@ RUN sed -i 's/listen 127.0.0.1;/listen 80 default_server;/' /etc/nginx/nginx.con RUN sed -i 's/server_name localhost;/server_name _;/' /etc/nginx/nginx.conf RUN mkdir /var/www/localhost/htdocs -# Container networking happens automatically -RUN sed -i 's/need net$/use net/' /etc/init.d/* - EXPOSE 80 diff --git a/ngircd/Dockerfile.template b/ngircd/Dockerfile.template index 5d12009..392c9e8 100644 --- a/ngircd/Dockerfile.template +++ b/ngircd/Dockerfile.template @@ -42,8 +42,5 @@ RUN sed -i 's/;AdminInfo2 = Location/AdminInfo2 = ${LOCATION}/' /etc/ngircd/ngir RUN sed -i 's/;AdminEMail = admin@irc.server/AdminEMail = ${EMAIL}/' /etc/ngircd/ngircd.conf 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 && exec tail-syslog EXPOSE 6667 diff --git a/package-cache/Dockerfile.template b/package-cache/Dockerfile.template index d9771fa..11129cf 100644 --- a/package-cache/Dockerfile.template +++ b/package-cache/Dockerfile.template @@ -37,7 +37,4 @@ RUN echo 'PC_OPTS="-vvv"' >> /etc/conf.d/package-cache Run echo 'PC_USER="root"' >> /etc/conf.d/package-cache 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/* - EXPOSE 80 diff --git a/postgresql/Dockerfile.template b/postgresql/Dockerfile.template index c01b264..3eae7fc 100644 --- a/postgresql/Dockerfile.template +++ b/postgresql/Dockerfile.template @@ -38,7 +38,4 @@ RUN echo host all all 0.0.0.0/0 trust >> $(echo /etc/postgresql*/pg_hba.conf # Setup logging RUN sed -i "s/\(#log_destination =.*\)/log_destination = 'syslog'\n\1/" /etc/postgresql*/postgresql.conf -# Container networking happens automatically -RUN sed -i 's/need net$/use net/' /etc/init.d/* - EXPOSE 5432 diff --git a/redis/Dockerfile.template b/redis/Dockerfile.template index 2cb2886..8500572 100644 --- a/redis/Dockerfile.template +++ b/redis/Dockerfile.template @@ -32,9 +32,6 @@ RUN rc-update add redis default # Bind to all interfaces RUN sed -i 's/bind /#bind /' /etc/redis.conf -# Container networking happens automatically -RUN sed -i 's/need net$/use net/' /etc/init.d/* - # A configurable environment variable (e.g. CONFIG_URL) would be nice. # Until then, hardcode the tweaks I need. RUN sed -i 's/\(# maxmemory-policy.*\)/\1\nmaxmemory-policy allkeys-lru/' /etc/redis.conf diff --git a/salt-minion/Dockerfile.template b/salt-minion/Dockerfile.template index 2908ea3..3e0088a 100644 --- a/salt-minion/Dockerfile.template +++ b/salt-minion/Dockerfile.template @@ -64,7 +64,4 @@ RUN sed -i 's|^\([[:space:]]*\)\(need net\)$|\1\2\n\1need logger|' /etc/init.d/s RUN sed -i 's|^#\(log_file: file:///dev/log\)|\1|' /etc/salt/minion RUN sed -i 's|^\(#log_level_logfile:.*\)$|\1\nlog_level_logfile: info|' /etc/salt/minion -# Container networking happens automatically -RUN sed -i 's/need net$/use net/' /etc/init.d/* - EXPOSE 80 diff --git a/stunnel/Dockerfile.template b/stunnel/Dockerfile.template index e0d7731..58557e4 100644 --- a/stunnel/Dockerfile.template +++ b/stunnel/Dockerfile.template @@ -36,8 +36,5 @@ RUN echo '[stunnel]' >> /etc/stunnel/stunnel.conf RUN echo 'accept = 9999' >> /etc/stunnel/stunnel.conf 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 && exec tail-syslog EXPOSE 9999