Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

docker build --tag gwf3/testing_base testing_base
docker build --tag gwf3/develop_dog develop_dog
10 changes: 10 additions & 0 deletions docker/develop_dog/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM gwf3/testing_base

RUN mkdir /ircd
COPY miniircd /ircd/

COPY cli.sh /

EXPOSE 6667 6697

CMD [ "/cli.sh" ]
63 changes: 63 additions & 0 deletions docker/develop_dog/cli.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/bash

# prevent attempts at name resolution from causing long timeouts
echo "nameserver 127.0.0.1" > /etc/resolv.conf

/ircd/miniircd --setuid root &

# show ip
ip a s eth0

echo
echo ".super default password: gizmore"
echo "Shadowlamb: must add core/module/Dog/dog_modules/dog_module/Shadowlamb/secret.php"
echo "Shadowlamb: for #gm*, must add core/module/Dog/dog_modules/dog_module/Shadowlamb/GameMasters.php"
echo

while true; do

echo -n "> "
read cmd

case "$cmd" in
"setup")
# use example config
cp /gwf3_src/www/protected/config.example.php /gwf3_run/config.php

# create dog db
mysql -e "CREATE USER 'dog'@'localhost' IDENTIFIED BY 'dog'; CREATE DATABASE dog; GRANT ALL ON dog.* TO 'dog'@'localhost' IDENTIFIED BY 'dog';"

# this will fail a bit, but not a big problem, it seems
php /gwf3_src/core/module/Dog/dog_bin/dog.php ../../../gwf3_run/config.php install

# add local irc server
mysql -e "USE dog; INSERT INTO dog_servers (serv_host, serv_port) VALUES ('localhost', 6667); INSERT INTO dog_nicks (nick_sid, nick_name) VALUES (1, 'dog');"
;;

"run")
php /gwf3_src/core/module/Dog/dog_bin/dog.php ../../../gwf3_run/config.php
;;

"shell")
bash
;;

"help")
echo "setup setup dog (only needed once if you keep the volumes)"
echo "run start dog"
echo "shell open (bash) shell"
echo "help list all available commands"
echo "quit quit"
;;

"quit")
exit 0
;;

*)
echo "unknown command: $cmd"
echo "try: help"
;;
esac

done
Loading