Browse Source

add exiftool for docker image

master
filesite 2 weeks ago
parent
commit
27f68f20c2
  1. 2
      Dockerfile
  2. 2
      themes/beauty/views/site/index.php

2
Dockerfile

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
FROM php:8.2-fpm-alpine3.20
RUN apk add autoconf gcc musl-dev make imagemagick-dev rsync nginx zlib-dev libpng-dev freetype-dev libjpeg-turbo-dev libwebp-dev \
RUN apk add autoconf gcc musl-dev make imagemagick-dev rsync nginx zlib-dev libpng-dev freetype-dev libjpeg-turbo-dev libwebp-dev exiftool \
&& docker-php-ext-install exif \
&& docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
&& docker-php-ext-install -j$(nproc) gd \

2
themes/beauty/views/site/index.php

@ -327,7 +327,7 @@ eof; @@ -327,7 +327,7 @@ eof;
//图片、视频显示文件修改日期
if (!empty($file['original_ctime'])) { //优先使用照片的拍摄日期
$title = '摄于' . date('Y-m-d', $file['original_ctime']);
$title = '摄于' . date('Y-m-d H:i', $file['original_ctime']);
}else {
$title = Common::getDateFromString($file['filename']); //根据文件名获取拍摄日期
if (empty($title) && !empty($file['fstat']['mtime']) && !empty($file['fstat']['ctime'])) {

Loading…
Cancel
Save