So I’m creating an updated sensu server based off hiroakis/docker-sensu-server. This will be centos7 with updated sensu (0.28.2), erlang (R19), rabbitmq-server (3.6.6), redis (2.8.19), and uchiwa (0.22.1).
redis is ipv4 only, so /etc/hosts can’t have ::1 otherwise there are connection errors in the logs and uchiwa doesn’t work properly, sensu-api I believe.
However, you can’t edit /etc/hosts with sed -ri because it does a mv, and the resource is busy by docker.
But you can copy data over it, so I used the following code:
sed -e 's/^::1/#::1/g' /etc/hosts > /etc/hosts.new && cp /etc/hosts /etc/hosts.org && cat /etc/hosts.new > /etc/hosts`