first - broken - pass at start/stop commands and working expose/expose commands

note that at the moment the iptables calls complete successfully but the container isn't actually exposed. We'll probably need to use the ambassador pattern to do this properly.
This commit is contained in:
Jose Diaz-Gonzalez
2015-08-31 15:29:23 -04:00
parent 075a39fe13
commit ac50d9c37c
3 changed files with 115 additions and 23 deletions

12
install
View File

@@ -8,3 +8,15 @@ fi
mkdir -p $PLUGIN_DATA_ROOT || echo "Failed to create $PLUGIN_SERVICE directory"
chown dokku:dokku $PLUGIN_DATA_ROOT
case "$DOKKU_DISTRO" in
ubuntu)
echo "%dokku ALL=(ALL) NOPASSWD:/sbin/iptables -t nat -A DOCKER -p tcp *, /sbin/iptables -t nat -D DOCKER -p tcp *" > /etc/sudoers.d/dokku-redis
;;
opensuse)
echo "%dokku ALL=(ALL) NOPASSWD:/sbin/iptables -t nat -A DOCKER -p tcp *, /sbin/iptables -t nat -D DOCKER -p tcp *" > /etc/sudoers.d/dokku-redis
;;
esac
chmod 0440 /etc/sudoers.d/dokku-redis