From 5a5ebaf3b5c5a1f97e811311029f146533f2fdea Mon Sep 17 00:00:00 2001 From: Ben van Hartingsveldt Date: Tue, 14 Jan 2025 23:17:42 +0100 Subject: [PATCH 1/8] Dockerize DAS --- das/Dockerfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 das/Dockerfile diff --git a/das/Dockerfile b/das/Dockerfile new file mode 100644 index 0000000..bd48c57 --- /dev/null +++ b/das/Dockerfile @@ -0,0 +1,15 @@ +FROM phpswoole/swoole:php8.3-alpine + +WORKDIR /opt/registry/das + +COPY . . + +RUN mv /opt/registry/das/config.php.dist /opt/registry/das/config.php +RUN sed -i "s|'db_username' => 'your_username'|'db_username' => '$DB_USER'|g" /opt/registry/das/config.php +RUN sed -i "s|'db_password' => 'your_password'|'db_password' => '$DB_PASSWORD'|g" /opt/registry/das/config.php + +RUN composer install + +VOLUME /var/log/namingo + +CMD ["php","/opt/registry/das/start_das.php"] \ No newline at end of file From 73f2ca17b0460aed77cdc136408b482365da9180 Mon Sep 17 00:00:00 2001 From: Ben van Hartingsveldt Date: Tue, 14 Jan 2025 23:24:52 +0100 Subject: [PATCH 2/8] Dockerize RDAP --- das/Dockerfile | 4 ++-- rdap/Dockerfile | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 rdap/Dockerfile diff --git a/das/Dockerfile b/das/Dockerfile index bd48c57..1d92fcb 100644 --- a/das/Dockerfile +++ b/das/Dockerfile @@ -4,12 +4,12 @@ WORKDIR /opt/registry/das COPY . . +RUN composer install + RUN mv /opt/registry/das/config.php.dist /opt/registry/das/config.php RUN sed -i "s|'db_username' => 'your_username'|'db_username' => '$DB_USER'|g" /opt/registry/das/config.php RUN sed -i "s|'db_password' => 'your_password'|'db_password' => '$DB_PASSWORD'|g" /opt/registry/das/config.php -RUN composer install - VOLUME /var/log/namingo CMD ["php","/opt/registry/das/start_das.php"] \ No newline at end of file diff --git a/rdap/Dockerfile b/rdap/Dockerfile new file mode 100644 index 0000000..ed131b5 --- /dev/null +++ b/rdap/Dockerfile @@ -0,0 +1,15 @@ +FROM phpswoole/swoole:php8.3-alpine + +WORKDIR /opt/registry/rdap + +COPY . . + +RUN composer install + +RUN mv /opt/registry/rdap/config.php.dist /opt/registry/rdap/config.php +RUN sed -i "s|'db_username' => 'your_username'|'db_username' => '$DB_USER'|g" /opt/registry/rdap/config.php +RUN sed -i "s|'db_password' => 'your_password'|'db_password' => '$DB_PASSWORD'|g" /opt/registry/rdap/config.php + +VOLUME /var/log/namingo + +CMD ["php","/opt/registry/rdap/start_rdap.php"] \ No newline at end of file From e5112eefa44ac16554544e5292322a2e0d1d4910 Mon Sep 17 00:00:00 2001 From: Ben van Hartingsveldt Date: Tue, 14 Jan 2025 23:26:54 +0100 Subject: [PATCH 3/8] Dockerize EPP --- epp/Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 epp/Dockerfile diff --git a/epp/Dockerfile b/epp/Dockerfile new file mode 100644 index 0000000..20bdbfc --- /dev/null +++ b/epp/Dockerfile @@ -0,0 +1,14 @@ +FROM phpswoole/swoole:php8.3-alpine + +WORKDIR /opt/registry/epp + +COPY . . + +RUN composer install +RUN mv /opt/registry/epp/config.php.dist /opt/registry/epp/config.php +RUN sed -i "s|'db_username' => 'your_username'|'db_username' => '$DB_USER'|g" /opt/registry/epp/config.php +RUN sed -i "s|'db_password' => 'your_password'|'db_password' => '$DB_PASSWORD'|g" /opt/registry/epp/config.php + +VOLUME /var/log/namingo + +CMD ["php","/opt/registry/epp/start_epp.php"] \ No newline at end of file From f160a8b14c3cc2de7e20ff3908df5fe9487ee225 Mon Sep 17 00:00:00 2001 From: Ben van Hartingsveldt Date: Tue, 14 Jan 2025 23:37:52 +0100 Subject: [PATCH 4/8] Dockerize WhoIs --- whois/port43/Dockerfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 whois/port43/Dockerfile diff --git a/whois/port43/Dockerfile b/whois/port43/Dockerfile new file mode 100644 index 0000000..5bc50f7 --- /dev/null +++ b/whois/port43/Dockerfile @@ -0,0 +1,15 @@ +FROM phpswoole/swoole:php8.3-alpine + +WORKDIR /opt/registry/whois/port43 + +COPY . . + +RUN composer install + +RUN mv /opt/registry/whois/port43/config.php.dist /opt/registry/whois/port43/config.php +RUN sed -i "s|'db_username' => 'your_username'|'db_username' => '$DB_USER'|g" /opt/registry/whois/port43/config.php +RUN sed -i "s|'db_password' => 'your_password'|'db_password' => '$DB_PASSWORD'|g" /opt/registry/whois/port43/config.php + +VOLUME /var/log/namingo + +CMD ["php","/opt/registry/whois/port43/start_whois.php"] \ No newline at end of file From 62c6978139486b97277230350c5b2fde4659e1e9 Mon Sep 17 00:00:00 2001 From: Ben van Hartingsveldt Date: Thu, 16 Jan 2025 10:45:41 +0100 Subject: [PATCH 5/8] Dockerize Automation --- automation/Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 automation/Dockerfile diff --git a/automation/Dockerfile b/automation/Dockerfile new file mode 100644 index 0000000..bb1183d --- /dev/null +++ b/automation/Dockerfile @@ -0,0 +1,17 @@ +FROM phpswoole/swoole:php8.3-alpine + +WORKDIR /opt/registry/automation + +COPY . . + +RUN composer install + +RUN mv /opt/registry/automation/config.php.dist /opt/registry/automation/config.php +RUN sed -i "s|'db_username' => 'your_username'|'db_username' => '$DB_USER'|g" /opt/registry/automation/config.php +RUN sed -i "s|'db_password' => 'your_password'|'db_password' => '$DB_PASSWORD'|g" /opt/registry/automation/config.php + +VOLUME /var/log/namingo + +RUN echo -e "*\t*\t*\t*\t*\t/usr/bin/php /opt/registry/automation/cron.php 1>> /dev/null 2>&1" >> /var/spool/cron/crontabs/root + +CMD ["crond"] \ No newline at end of file From 199e0e477244547e77122bdfd4a2f4776c0902bb Mon Sep 17 00:00:00 2001 From: Ben van Hartingsveldt Date: Thu, 16 Jan 2025 11:06:12 +0100 Subject: [PATCH 6/8] Dockerize WhoIs Web --- whois/web/Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 whois/web/Dockerfile diff --git a/whois/web/Dockerfile b/whois/web/Dockerfile new file mode 100644 index 0000000..b739634 --- /dev/null +++ b/whois/web/Dockerfile @@ -0,0 +1,14 @@ +FROM php:8.3-alpine + +WORKDIR /var/www/whois + +COPY . . + +RUN composer require gregwar/captcha +RUN mv /var/www/whois/config.php.dist /var/www/whois/config.php +RUN sed -i "s|'whois_url' => '.*'|'whois_url' => 'whois.${REGISTRY_DOMAIN}'|" /var/www/whois/config.php +RUN sed -i "s|'rdap_url' => '.*'|'rdap_url' => 'rdap.${REGISTRY_DOMAIN}'|" /var/www/whois/config.php + +VOLUME /var/log/namingo + +CMD ["php-fpm","-D"] \ No newline at end of file From 98b2f93d7e074367660b285e181a99ac8f5bd473 Mon Sep 17 00:00:00 2001 From: Ben van Hartingsveldt Date: Thu, 16 Jan 2025 11:19:24 +0100 Subject: [PATCH 7/8] Dockerize Control Panel --- cp/Dockerfile | 14 ++++++++++++++ whois/web/Dockerfile | 6 +++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 cp/Dockerfile diff --git a/cp/Dockerfile b/cp/Dockerfile new file mode 100644 index 0000000..ce39e99 --- /dev/null +++ b/cp/Dockerfile @@ -0,0 +1,14 @@ +FROM php:8.3-alpine + +WORKDIR /var/www/cp + +# Install Composer +COPY --from=composer:latest /usr/bin/composer /usr/bin/composer + +COPY . . + +RUN composer install + +VOLUME /var/log/namingo + +CMD ["php-fpm","-D"] \ No newline at end of file diff --git a/whois/web/Dockerfile b/whois/web/Dockerfile index b739634..e347026 100644 --- a/whois/web/Dockerfile +++ b/whois/web/Dockerfile @@ -4,7 +4,11 @@ WORKDIR /var/www/whois COPY . . -RUN composer require gregwar/captcha +# Install Composer +COPY --from=composer:latest /usr/bin/composer /usr/bin/composer + +RUN composer install + RUN mv /var/www/whois/config.php.dist /var/www/whois/config.php RUN sed -i "s|'whois_url' => '.*'|'whois_url' => 'whois.${REGISTRY_DOMAIN}'|" /var/www/whois/config.php RUN sed -i "s|'rdap_url' => '.*'|'rdap_url' => 'rdap.${REGISTRY_DOMAIN}'|" /var/www/whois/config.php From 4fc1249402f23e41bb22a8e88e7396e491c3ea11 Mon Sep 17 00:00:00 2001 From: Ben van Hartingsveldt Date: Thu, 16 Jan 2025 11:40:56 +0100 Subject: [PATCH 8/8] Add PHP extensions --- automation/Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/automation/Dockerfile b/automation/Dockerfile index bb1183d..d7a858b 100644 --- a/automation/Dockerfile +++ b/automation/Dockerfile @@ -1,5 +1,13 @@ FROM phpswoole/swoole:php8.3-alpine +RUN apk add gmp +RUN apk add gmp-dev + +RUN docker-php-ext-install gmp +RUN docker-php-ext-install mysqli + +RUN apk del gmp-dev + WORKDIR /opt/registry/automation COPY . .