|
| 1 | +FROM oraclelinux:7-slim |
| 2 | + |
| 3 | +WORKDIR /root |
| 4 | + |
| 5 | + |
| 6 | +RUN yum -y install\ |
| 7 | + which git make cmake gcc curl perl perl-core tar zip unzip bzip2 which procps postfix\ |
| 8 | + mariadb-devel mariadb-server mariadb\ |
| 9 | + vim nano\ |
| 10 | + ImageMagick-perl perl-GD netpbm-progs ImageMagick libpng-devel libjpeg-devel\ |
| 11 | + libxml2-devel expat-devel openssl-devel openssl gmp-devel\ |
| 12 | + httpd mod_ssl vsftpd ftp memcached\ |
| 13 | + &&\ |
| 14 | + yum -y install https://download.oracle.com/otn_software/linux/instantclient/217000/oracle-instantclient-basic-21.7.0.0.0-1.x86_64.rpm &&\ |
| 15 | + yum -y install oracle-instantclient-basic oracle-instantclient-release-el7 &&\ |
| 16 | + yum -y install oracle-instantclient-devel oracle-instantclient-sqlplus &&\ |
| 17 | + yum -y reinstall glibc-common &&\ |
| 18 | + yum -y install oracle-epel-release-el7 &&\ |
| 19 | + yum -y --enablerepo=ol7_developer_EPEL install\ |
| 20 | + GraphicsMagick-perl-1.3.32-1.el7 clang\ |
| 21 | + && yum clean --enablerepo=ol7_developer_EPEL all &&\ |
| 22 | + yum -y install oracle-php-release-el7 &&\ |
| 23 | + yum -y --enablerepo=ol7_developer_php74 install\ |
| 24 | + php php-mysqlnd php-gd php-mbstring phpunit php-oci8-21c\ |
| 25 | + && yum clean --enablerepo=ol7_developer_php74 all &&\ |
| 26 | + yum -y --enablerepo=ol7_optional_latest install\ |
| 27 | + gd-devel giflib-devel libwebp-devel libstdc++-static\ |
| 28 | + &&\ |
| 29 | + yum -y update --skip-broken &&\ |
| 30 | + yum clean all && rm -rf /var/cache/yum &&\ |
| 31 | + mkdir src && cd src &&\ |
| 32 | + curl -LO https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.8.tar.gz && tar xf ruby-2.7.8.tar.gz &&\ |
| 33 | + cd ruby-2.7.8 && ./configure --enable-shared --disable-install-doc && make -j4 && make install && cd .. &&\ |
| 34 | + cd .. && rm -rf src && ldconfig /usr/local/lib &&\ |
| 35 | + curl -sL https://phar.phpunit.de/phpunit-9.phar > phpunit && chmod +x phpunit &&\ |
| 36 | + mv phpunit /usr/local/bin/ &&\ |
| 37 | + (curl -sL https://raw.githubusercontent.com/axllent/mailpit/develop/install.sh | bash) &&\ |
| 38 | + gem install \ |
| 39 | + fluentd\ |
| 40 | + &&\ |
| 41 | + 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 &&\ |
| 42 | + curl -sL --compressed https://git.io/cpm > cpm &&\ |
| 43 | + chmod +x cpm &&\ |
| 44 | + mv cpm /usr/local/bin/ &&\ |
| 45 | + cpanm -n DBI Test::NoWarnings XMLRPC::Lite XML::Atom Net::Server Perl::Critic::Pulp Selenium::Remote::Driver &&\ |
| 46 | + cpanm -v SQL::Translator@1.63 Archive::Zip@1.65 DBD::mysql@4.050 HTTP::Message@6.46 &&\ |
| 47 | + cpanm -v \ |
| 48 | + pQuery\ |
| 49 | + JSON::XS Starman Plack::Middleware::ReverseProxy\ |
| 50 | + JavaScript::Minifier CSS::Minifier\ |
| 51 | + DBD::Oracle\ |
| 52 | + Fluent::Logger\ |
| 53 | + && curl -sLO https://raw.githubusercontent.com/movabletype/movabletype/develop/t/cpanfile &&\ |
| 54 | + cpanm --installdeps -v . &&\ |
| 55 | + rm -rf cpanfile /root/.perl-cpm /root/.cpanm /root/.qws |
| 56 | + |
| 57 | +ENV LANG=en_US.UTF-8 \ |
| 58 | + LC_ALL=en_US.UTF-8 |
| 59 | + |
| 60 | +RUN set -ex &&\ |
| 61 | + perl -i -pe \ |
| 62 | + 's!AllowOverride None!AllowOverride All!g; s!#AddEncoding x-gzip \.gz \.tgz!AddEncoding x-gzip .gz .tgz .svgz!g;' \ |
| 63 | + /etc/httpd/conf/httpd.conf &&\ |
| 64 | + perl -e 'my ($inifile) = `php --ini` =~ m!Loaded Configuration File:\s+(/\S+/php.ini)!; \ |
| 65 | + my $ini = do { open my $fh, "<", $inifile; local $/; <$fh> }; \ |
| 66 | + $ini =~ s!^;\s*date\.timezone =!date\.timezone = "Asia/Tokyo"!m; \ |
| 67 | + open my $fh, ">", $inifile; print $fh $ini' &&\ |
| 68 | + sed -i -E 's/inet_protocols = all/inet_protocols = ipv4/' /etc/postfix/main.cf |
| 69 | + |
| 70 | +RUN cd /etc/pki/tls/certs/ && ./make-dummy-cert /etc/pki/tls/certs/localhost.crt &&\ |
| 71 | + perl -i -pe 's!SSLCertificateKeyFile /etc/pki/tls/private/localhost.key!!' \ |
| 72 | + /etc/httpd/conf.d/ssl.conf && cd $WORKDIR |
| 73 | + |
| 74 | +COPY ./docker-entrypoint.sh / |
| 75 | +ENTRYPOINT ["/docker-entrypoint.sh"] |
0 commit comments