Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CentOS -> Rocky Linux 8 変更 #10

Merged
merged 5 commits into from
Nov 5, 2023
Merged
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
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ version: "3"
# サービス定義
services:
swagger-editor:
platform: linux/x86_64
image: swaggerapi/swagger-editor
container_name: "swagger-editor"
ports:
- "8001:8080"
swagger-ui:
platform: linux/x86_64
image: swaggerapi/swagger-ui
container_name: "swagger-ui"
ports:
Expand All @@ -18,6 +20,7 @@ services:
environment:
SWAGGER_JSON: /_data_api.yaml
redoc:
platform: linux/x86_64
image: redocly/redoc
container_name: "redoc"
environment:
Expand Down
97 changes: 51 additions & 46 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,96 +1,98 @@
# CentOSの最新を指定
# FROM centos:latest
# CentOS 7 固定指定
FROM centos:7
# Rocky Linuxの最新を指定
FROM rockylinux/rockylinux:latest
RUN echo /etc/redhat-release
ARG MT_FILE="local"
RUN echo ${MT_FILE}
MAINTAINER "redamoon"
USER root
RUN yum -y clean all
RUN dnf -y clean all

RUN rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7
RUN rpm --import http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
# ===========================
# Perl Tools
# ===========================
RUN dnf install -y perl perl-App-cpanminus perl-devel

RUN yum -y update && yum clean all
RUN perl -v

# ===========================
# Locale Setting
# ===========================
RUN rm -f /etc/rpm/macros.image-language-conf && \
sed -i '/^override_install_langs=/d' /etc/yum.conf && \
yum -y reinstall glibc-common && \
yum clean all

ENV LANG="ja_JP.UTF-8" \
LANGUAGE="ja_JP:ja" \
LC_ALL="ja_JP.UTF-8"
RUN unlink /etc/localtime
RUN ln -s /usr/share/zoneinfo/Japan /etc/localtime
RUN cd ~/ \
&& dnf -y install langpacks-ja \
&& localectl set-locale LANG=ja_JP.UTF-8; exit 0

# ===========================
# Base Package
# ===========================
RUN yum -y install git unzip glibc httpd httpd-devel
RUN dnf -y install git unzip glibc httpd httpd-devel

# ===========================
# Remi リポジトリの追加
# ===========================
RUN yum -y install epel-release
RUN yum -y install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
# Rocky LinuxでもEPELリポジトリは利用できますが、RemiリポジトリのURLが変更される可能性があるので確認してください。
RUN dnf -y install epel-release
RUN dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

# ===========================
# Perl・DB・Yumリポジトリ・CAPN
# Perl・DB・Dnfリポジトリ・CAPN
# ===========================
RUN yum -y install perl-CGI perl-CPAN "perl(Module::Build)" "perl(DBD::mysql)"
RUN dnf -y install perl-CGI perl-CPAN "perl(Module::Build)" "perl(DBD::mysql)"

# ===========================
# 必須モジュール
# ===========================
RUN yum -y install "perl(Image::Magick)" "perl(Digest::MD5)" "perl(Mozilla::CA)" "perl(HTML::Entities)"
RUN dnf -y install "perl(Image::Magick)" "perl(Digest::MD5)" "perl(Mozilla::CA)" "perl(HTML::Entities)"

# ===========================
# Memcached
# ===========================
RUN yum -y install memcached "perl(Cache::Memcached)"
RUN dnf -y install memcached "perl(Cache::Memcached)"

# ===========================
# SMTP認証関連ライブラリー
# ===========================
RUN yum -y install "perl(IO::Socket::SSL)" "perl(Net::SSLeay)" "perl(Net::SMTP::SSL)" "perl(Net::SMTP::TLS)"
RUN yum -y install "perl(Digest::HMAC)"
RUN dnf -y install "perl(IO::Socket::SSL)" "perl(Net::SSLeay)" "perl(Net::SMTP::SSL)"
RUN dnf -y install "perl(Digest::HMAC)"

RUN dnf -y install "perl(IO::Socket::SSL)" "perl(Net::SSLeay)" "perl(Net::SMTP::SSL)"
RUN cpan Net::SMTP::TLS
RUN dnf -y install "perl(Digest::HMAC)"
RUN cpan Net::SMTP::TLS

# ===========================
# Other:バックアップ
# ===========================
RUN yum -y install "perl(Archive::Zip)" "perl(Archive::Tar)" "perl(XML::LibXML::SAX)" "perl(XML::SAX::Expat)"
RUN yum -y install expat-devel "perl(ExtUtils::MakeMaker)" "perl(Test::Simple)" "perl(XML::Parser)"
RUN dnf -y install "perl(Archive::Zip)" "perl(Archive::Tar)" "perl(XML::LibXML::SAX)"
RUN dnf -y install expat-devel "perl(ExtUtils::MakeMaker)" "perl(Test::Simple)" "perl(XML::Parser)"
RUN dnf -y install "perl(Archive::Zip)" "perl(Archive::Tar)" "perl(XML::LibXML::SAX)"
RUN cpan XML::SAX::Expat

# ===========================
# Other:PSGI
# ===========================
RUN yum -y install "perl(CGI::Parse::PSGI)" "perl(Plack)"
RUN yum -y install "perl(CGI)"
RUN yum -y install "perl(SOAP::Transport::HTTP)" "perl(XMLRPC::Transport::HTTP)"
RUN dnf -y install --skip-broken "perl(CGI::Parse::PSGI)" "perl(Plack)"
RUN dnf -y install --skip-broken "perl(CGI)"
RUN dnf -y install --skip-broken "perl(SOAP::Transport::HTTP)" "perl(XMLRPC::Transport::HTTP)"
#RUN cpan Devel::StackTrace CGI::Parse::PSGI Plack CGI
#RUN cpan SOAP::Transport::HTTP XMLRPC::Transport::HTTP #cpanだと時間がかかりすぎてタイムアウトする

# ===========================
# Other:ライブラリ
# ===========================
RUN yum -y install "perl(Authen::SASL)" "perl(Crypt::SSLeay)" "perl(Crypt::DSA)" "perl(Digest::SHA)" "perl(Digest::SHA1)" "perl(HTML::Parser)" "perl(XML::Parser)" "perl(YAML::Syck)"
RUN yum -y install "perl(Heap::Fibonacci)" "perl(File::NFSLock)" "perl(IO::String)" "perl(DB_File)" "perl(HTTP::Date)" "perl(Text::CSV_XS)" "perl(MIME::Parser)" "perl(LWP::UserAgent)" "perl(Scalar::Util)" "perl(CGI::Cookie)" "perl(File::Spec)" "perl(parent)"
RUN dnf -y install --skip-broken "perl(Authen::SASL)" "perl(Crypt::SSLeay)" "perl(Crypt::DSA)" "perl(Digest::SHA)" "perl(Digest::SHA1)" "perl(HTML::Parser)" "perl(XML::Parser)"
RUN dnf -y install --skip-broken "perl(Heap::Fibonacci)" "perl(File::NFSLock)" "perl(IO::String)" "perl(DB_File)" "perl(HTTP::Date)" "perl(Text::CSV_XS)" "perl(MIME::Parser)" "perl(LWP::UserAgent)" "perl(Scalar::Util)" "perl(CGI::Cookie)" "perl(File::Spec)" "perl(parent)"

# ===========================
# php
# ===========================
RUN yum -y install --enablerepo=remi,remi-php72 php php-devel php-mbstring php-pdo php-gd php-xml php-mcrypt php-mysqlnd && \
yum clean all && \
sed -i -e "s/;date.timezone *=.*$/date.timezone = Asia\/Tokyo/" /etc/php.ini && \
sed -i -e "s/;mbstring.language *=.*$/mbstring.language = Japanese/" /etc/php.ini && \
sed -i -e "s/;mbstring.internal_encoding *=.*$/mbstring.internal_encoding = UTF-8/" /etc/php.ini && \
sed -i -e "s/;mbstring.http_input *=.*$/mbstring.http_input = UTF-8/" /etc/php.ini && \
sed -i -e "s/;mbstring.http_output *=.*$/mbstring.http_output = pass/" /etc/php.ini && \
sed -i -e "s/;mbstring.encoding_translation *=.*$/mbstring.encoding_translation = On/" /etc/php.ini && \
sed -i -e "s/;mbstring.detect_order *=.*$/mbstring.detect_order = pass/" /etc/php.ini && \
sed -i -e "s/;mbstring.substitute_charset *=.*$/mbstring.substitute_charset = none/" /etc/php.ini
#RUN dnf -y install --enablerepo=remi,remi-php82 php php-devel php-mbstring php-pdo php-gd php-xml php-mcrypt php-mysqlnd && \
# dnf clean all && \
# sed -i -e "s/;date.timezone *=.*$/date.timezone = Asia\/Tokyo/" /etc/php.ini && \
# sed -i -e "s/;mbstring.language *=.*$/mbstring.language = Japanese/" /etc/php.ini && \
# sed -i -e "s/;mbstring.internal_encoding *=.*$/mbstring.internal_encoding = UTF-8/" /etc/php.ini && \
# sed -i -e "s/;mbstring.http_input *=.*$/mbstring.http_input = UTF-8/" /etc/php.ini && \
# sed -i -e "s/;mbstring.http_output *=.*$/mbstring.http_output = pass/" /etc/php.ini && \
# sed -i -e "s/;mbstring.encoding_translation *=.*$/mbstring.encoding_translation = On/" /etc/php.ini && \
# sed -i -e "s/;mbstring.detect_order *=.*$/mbstring.detect_order = pass/" /etc/php.ini && \
# sed -i -e "s/;mbstring.substitute_charset *=.*$/mbstring.substitute_charset = none/" /etc/php.ini

# ===========================
# Httpd Setting
Expand All @@ -102,6 +104,7 @@ RUN sed -i -e "s/AllowOverride None/AllowOverride All/g" /etc/httpd/conf/httpd.c
RUN sed -i -e "s/DirectoryIndex index.html index.html.var/DirectoryIndex index.html index.php/g" /etc/httpd/conf/httpd.conf
RUN sed -i '$a\LoadModule include_module modules/mod_include.so' /etc/httpd/conf/httpd.conf
RUN sed -i '$a\LoadModule filter_module modules/mod_filter.so' /etc/httpd/conf/httpd.conf
RUN mkdir -p /var/www/local/html
RUN mkdir -p /var/www/local/cgi-bin

# ===========================
Expand All @@ -110,9 +113,11 @@ RUN mkdir -p /var/www/local/cgi-bin
ADD mt-data/${MT_FILE}.zip /var/www/local/cgi-bin/
RUN unzip /var/www/local/cgi-bin/${MT_FILE}.zip -d '/var/www/local/cgi-bin/'
RUN mv /var/www/local/cgi-bin/${MT_FILE} /var/www/local/cgi-bin/mt
RUN chown -R apache:apache /var/www/local/html
RUN chown -R apache:apache /var/www/local/cgi-bin/mt
RUN chmod 777 /var/www/
RUN chmod 777 /var/www/local
RUN chmod 777 /var/www/local/html
RUN chmod 755 /var/www/local/cgi-bin/mt/*.cgi

EXPOSE 80
Expand Down
11 changes: 0 additions & 11 deletions setup-mt7.sh

This file was deleted.