-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #125 from movabletype/mysql84
Mysql84
- Loading branch information
Showing
4 changed files
with
145 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
FROM ubuntu:noble | ||
|
||
WORKDIR /root | ||
|
||
COPY ./patch/ /root/patch/ | ||
|
||
RUN \ | ||
apt-get update &&\ | ||
DEBIAN_FRONTEND=noninteractive DEBCONF_NOWARNINGS=yes\ | ||
apt-get --no-install-recommends -y install curl wget gnupg ca-certificates lsb-release &&\ | ||
curl -LO https://dev.mysql.com/get/mysql-apt-config_0.8.33-1_all.deb &&\ | ||
DEBIAN_FRONTEND=noninteractive DEBCONF_NOWARNINGS=yes dpkg -i mysql-apt-config_0.8.33-1_all.deb &&\ | ||
rm mysql-apt-config_0.8.33-1_all.deb &&\ | ||
apt-get update &&\ | ||
DEBIAN_FRONTEND=noninteractive DEBCONF_NOWARNINGS=yes\ | ||
apt-get --no-install-recommends -y install\ | ||
ca-certificates netbase git make cmake gcc clang curl ssh locales perl zip unzip bzip2 procps ssl-cert postfix\ | ||
mysql-server mysql-client libmysqlclient-dev\ | ||
vim nano\ | ||
perlmagick libgraphics-magick-perl netpbm imagemagick graphicsmagick libgd-dev libpng-dev libgif-dev libjpeg-dev libwebp-dev icc-profiles-free\ | ||
libxml2-dev libgmp-dev libssl-dev\ | ||
php-mbstring php-xml php php-cli php-mysqlnd php-gd php-memcache phpunit\ | ||
ruby ruby-dev\ | ||
apache2 vsftpd ftp memcached\ | ||
&& apt-get clean && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* &&\ | ||
ln -s /usr/sbin/apache2 /usr/sbin/httpd &&\ | ||
curl -sL https://phar.phpunit.de/phpunit-9.phar > phpunit && chmod +x phpunit &&\ | ||
mv phpunit /usr/local/bin/ &&\ | ||
(curl -sL https://raw.githubusercontent.com/axllent/mailpit/develop/install.sh | bash) &&\ | ||
gem install \ | ||
fluentd\ | ||
&&\ | ||
curl -sL https://cpanmin.us > cpanm && chmod +x cpanm && perl -pi -E 's{http://(www\.cpan\.org|backpan\.perl\.org|cpan\.metacpan\.org|fastapi\.metacpan\.org|cpanmetadb\.plackperl\.org)}{https://$1}g' cpanm && mv cpanm /usr/local/bin &&\ | ||
curl -sL --compressed https://git.io/cpm > cpm &&\ | ||
chmod +x cpm &&\ | ||
mv cpm /usr/local/bin/ &&\ | ||
cpm install -g --show-build-log-on-failure GD XMLRPC::Lite XML::Atom Net::Server Perl::Critic::Pulp Selenium::Remote::Driver &&\ | ||
cpm install -g --test --show-build-log-on-failure Archive::[email protected] DBD::[email protected] HTTP::[email protected] &&\ | ||
cd /root/patch/Test-mysqld-1.0020 && cpanm --installdeps . && cpanm . && cd /root &&\ | ||
rm -rf /root/patch &&\ | ||
cpanm -v \ | ||
pQuery\ | ||
JSON::XS Starman Imager::File::WEBP Plack::Middleware::ReverseProxy\ | ||
JavaScript::Minifier CSS::Minifier\ | ||
Fluent::Logger\ | ||
&& curl -sLO https://raw.githubusercontent.com/movabletype/movabletype/develop/t/cpanfile &&\ | ||
cpanm -v --installdeps . \ | ||
&& rm -rf cpanfile /root/.perl-cpm/ /root/.cpanm /root/.qws | ||
|
||
RUN set -ex &&\ | ||
localedef -i en_US -f UTF-8 en_US.UTF-8 &&\ | ||
localedef -i ja_JP -f UTF-8 ja_JP.UTF-8 &&\ | ||
a2dismod mpm_event &&\ | ||
a2enmod mpm_prefork cgi rewrite proxy proxy_http ssl &&\ | ||
a2enconf serve-cgi-bin &&\ | ||
a2ensite default-ssl &&\ | ||
make-ssl-cert generate-default-snakeoil &&\ | ||
find /etc/apache2/ | grep '\.conf' | xargs perl -i -pe \ | ||
's!AllowOverride None!AllowOverride All!g; s!/usr/lib/cgi-bin!/var/www/cgi-bin!g; s!#AddEncoding x-gzip \.gz \.tgz!AddEncoding x-gzip .gz .tgz .svgz!g;' &&\ | ||
perl -e 'my ($inifile) = `php --ini` =~ m!Loaded Configuration File:\s+(/\S+/php.ini)!; \ | ||
my $ini = do { open my $fh, "<", $inifile or die $!; local $/; <$fh> }; \ | ||
$ini =~ s!^;\s*date\.timezone =!date\.timezone = "Asia/Tokyo"!m; \ | ||
open my $fh, ">", $inifile or die $!; print $fh $ini' | ||
|
||
|
||
ENV LANG=en_US.UTF-8 \ | ||
LC_ALL=en_US.UTF-8 \ | ||
APACHE_RUN_DIR=/var/run/apache2 \ | ||
APACHE_RUN_USER=www-data \ | ||
APACHE_RUN_GROUP=www-data \ | ||
APACHE_LOG_DIR=/var/log/apache2 \ | ||
APACHE_PID_FILE=/var/run/apache2.pid \ | ||
APACHE_LOCK_DIR=/var/lock/apache2 \ | ||
APACHE_CONF_DIR=/etc/apache2 | ||
|
||
COPY ./docker-entrypoint.sh / | ||
ENTRYPOINT ["/docker-entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
bash -c "cd /usr; mysqld --datadir='/var/lib/mysql' --user=mysql &" | ||
|
||
sleep 1 | ||
until mysqladmin ping -h localhost --silent; do | ||
echo 'waiting for mysqld to be connectable...' | ||
sleep 1 | ||
done | ||
service memcached start | ||
|
||
mysql -e "create database mt_test character set utf8;" | ||
mysql -e "create user mt@localhost;" | ||
mysql -e "grant all privileges on mt_test.* to mt@localhost;" | ||
|
||
if [ -f t/cpanfile ]; then | ||
cpanm --installdeps -n . --cpanfile=t/cpanfile | ||
fi | ||
|
||
exec "$@" |