- LibreOffice Word→PDF 변환 시 Pretendard 폰트 인식을 위해 설치 - wget으로 GitHub 릴리즈에서 OTF 폰트 9개 weight 다운로드 - fc-cache 갱신으로 시스템 폰트로 등록
43 lines
1.3 KiB
Docker
Executable File
43 lines
1.3 KiB
Docker
Executable File
FROM php:8.4-fpm
|
|
|
|
# 필수 패키지/확장 설치
|
|
RUN apt-get update && apt-get install -y \
|
|
git \
|
|
unzip \
|
|
libzip-dev \
|
|
libicu-dev \
|
|
libxml2-dev \
|
|
libpng-dev \
|
|
libfreetype-dev \
|
|
libjpeg62-turbo-dev \
|
|
nginx \
|
|
supervisor \
|
|
libreoffice-writer-nogui \
|
|
fonts-nanum fonts-nanum-extra \
|
|
ffmpeg \
|
|
wget \
|
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
|
&& docker-php-ext-install zip mysqli pdo pdo_mysql intl soap gd \
|
|
# Pretendard 폰트 설치 (Word→PDF 변환 시 한글 폰트 지원)
|
|
&& mkdir -p /usr/share/fonts/truetype/pretendard \
|
|
&& wget -q "https://github.com/orioncactus/pretendard/releases/download/v1.3.9/Pretendard-1.3.9.zip" -O /tmp/pretendard.zip \
|
|
&& unzip -jo /tmp/pretendard.zip "*/Pretendard-*.otf" -d /usr/share/fonts/truetype/pretendard/ \
|
|
&& rm -f /tmp/pretendard.zip \
|
|
&& fc-cache -f
|
|
|
|
# Composer 설치
|
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
|
|
|
# 타임존 설정
|
|
RUN echo "date.timezone=Asia/Seoul" > /usr/local/etc/php/conf.d/timezone.ini
|
|
|
|
# 포트 개방
|
|
EXPOSE 80
|
|
|
|
# supervisor로 nginx+php-fpm 동시 기동
|
|
CMD ["/usr/bin/supervisord"]
|
|
|
|
# entrypoint.sh 복사 및 권한
|
|
COPY ./mng/entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
ENTRYPOINT ["/entrypoint.sh"] |