-
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.
- Loading branch information
Showing
8 changed files
with
93 additions
and
135 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ on: | |
- kubectl | ||
- radiance-bot | ||
- nezha | ||
- webserv | ||
tag: | ||
description: 'Image tag' | ||
|
||
|
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,87 @@ | ||
FROM rockylinux:9 | ||
|
||
LABEL [email protected] | ||
LABEL VERSION=1.0.0 | ||
|
||
LABEL source_maintainer="Kleis Auke Wolthuizen <[email protected]>" | ||
|
||
ARG NGINX_VERSION=1.27.0 | ||
|
||
WORKDIR /var/www/imagesweserv | ||
|
||
RUN curl https://github.com/weserv/images/archive/refs/heads/5.x.zip -o images.zip && \ | ||
unzip images.zip && \ | ||
cp -a images-5.x/* /var/www/imagesweserv/ && \ | ||
rm -rf images.zip images-5.x | ||
|
||
# Update packages | ||
RUN dnf update -y \ | ||
# Install libvips and needed dependencies | ||
&& dnf install -y epel-release \ | ||
&& crb enable \ | ||
&& dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm \ | ||
&& dnf config-manager --set-enabled remi \ | ||
&& dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-9.noarch.rpm \ | ||
&& dnf group install -y --with-optional 'Development Tools' \ | ||
&& dnf install -y --setopt=tsflags=nodocs --setopt=install_weak_deps=False \ | ||
vips-devel \ | ||
vips-heif \ | ||
vips-poppler \ | ||
vips-magick-im6 \ | ||
jemalloc-devel \ | ||
openssl-devel \ | ||
pcre2-devel \ | ||
zlib-devel \ | ||
nginx-filesystem \ | ||
# Build CMake-based project | ||
&& cmake -S . -B _build \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DBUILD_TOOLS=ON \ | ||
-DNGX_VERSION=$NGINX_VERSION \ | ||
-DCUSTOM_NGX_FLAGS="--prefix=/usr/share/nginx;\ | ||
--sbin-path=/usr/sbin/nginx;\ | ||
--modules-path=/usr/lib64/nginx/modules;\ | ||
--conf-path=/etc/nginx/nginx.conf;\ | ||
--error-log-path=/var/log/nginx/error.log;\ | ||
--http-log-path=/var/log/nginx/access.log;\ | ||
--http-client-body-temp-path=/var/lib/nginx/tmp/client_body;\ | ||
--http-proxy-temp-path=/var/lib/nginx/tmp/proxy;\ | ||
--http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi;\ | ||
--http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi;\ | ||
--http-scgi-temp-path=/var/lib/nginx/tmp/scgi;\ | ||
--pid-path=/run/nginx.pid;\ | ||
--lock-path=/run/lock/subsys/nginx;\ | ||
--user=nginx;\ | ||
--group=nginx" \ | ||
&& cmake --build _build -- -j$(nproc) \ | ||
&& ldconfig \ | ||
# Remove build directory and dependencies | ||
&& rm -rf _build \ | ||
&& dnf group remove -y 'Development Tools' \ | ||
&& dnf remove -y \ | ||
vips-devel \ | ||
openssl-devel \ | ||
pcre2-devel \ | ||
zlib-devel \ | ||
&& dnf clean all \ | ||
# Ensure nginx directories exist with the correct permissions | ||
&& mkdir -m 700 /var/lib/nginx \ | ||
&& mkdir -m 700 /var/lib/nginx/tmp \ | ||
&& mkdir -m 700 /usr/lib64/nginx \ | ||
&& mkdir -m 755 /usr/lib64/nginx/modules \ | ||
# Forward request and error logs to docker log collector | ||
&& ln -sf /dev/stdout /var/log/nginx/weserv-access.log \ | ||
&& ln -sf /dev/stderr /var/log/nginx/weserv-error.log \ | ||
# Copy nginx configuration to the appropriate location | ||
&& cp ngx_conf/*.conf /etc/nginx | ||
|
||
# Set default timezone (can be overridden with -e "TZ=Continent/City") | ||
ENV TZ=Asia/Shanghai \ | ||
# Use jemalloc on glibc-based Linux systems to reduce the effects of memory fragmentation | ||
LD_PRELOAD=/usr/lib64/libjemalloc.so | ||
|
||
EXPOSE 80 | ||
|
||
STOPSIGNAL SIGQUIT | ||
|
||
CMD ["nginx", "-g", "daemon off;"] |
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,5 @@ | ||
## 介绍 | ||
|
||
在线图片处理,适配arm | ||
|
||
来源:https://github.com/weserv/images |