openresty添加geoip2模块

使用开源的openresty打包了一个docker的镜像之后无法使用,之后打算FROM 1panel/openresty:1.21.4.3-3-3-focal 来进行编译添加模块,但没有在容器中找到configure文件,你们是打包好之后删除了嘛,这块儿我理解是属于开源内容,但是没有找到对应的Dockerfile或者是makefile,请告知一下具体编译的路径是在哪里的

https://github.com/openresty/docker-openresty/blob/master/focal/Dockerfile
你可以参考这个
我们会在 v2 版本增加添加扩展功能

你好,我看这会儿安装的1panel都是v2.0.1的,这个功能是否上架了呢


类似这样

好像是打包失败了
Nginx信息如下:
root@anolisos:/# nginx -V
nginx version: openresty/1.27.1.2
built by gcc 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
built with OpenSSL 3.4.1 11 Feb 2025
TLS SNI support enabled
configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt=‘-O2 -DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/pcre2/include -I/usr/local/openresty/openssl3/include’ --add-module=…/ngx_devel_kit-0.3.3 --add-module=…/echo-nginx-module-0.63 --add-module=…/xss-nginx-module-0.06 --add-module=…/ngx_coolkit-0.2 --add-module=…/set-misc-nginx-module-0.33 --add-module=…/form-input-nginx-module-0.12 --add-module=…/encrypted-session-nginx-module-0.09 --add-module=…/srcache-nginx-module-0.33 --add-module=…/ngx_lua-0.10.28 --add-module=…/ngx_lua_upstream-0.07 --add-module=…/headers-more-nginx-module-0.37 --add-module=…/array-var-nginx-module-0.06 --add-module=…/memc-nginx-module-0.20 --add-module=…/redis2-nginx-module-0.15 --add-module=…/redis-nginx-module-0.3.9 --add-module=…/ngx_stream_lua-0.0.16 --with-ld-opt=‘-Wl,-rpath,/usr/local/openresty/luajit/lib -L/usr/local/openresty/pcre2/lib -L/usr/local/openresty/openssl3/lib -Wl,-rpath,/usr/local/openresty/pcre2/lib:/usr/local/openresty/openssl3/lib’ --with-pcre --with-compat --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_v3_module --with-http_xslt_module=dynamic --with-ipv6 --with-mail --with-mail_ssl_module --with-md5-asm --with-sha1-asm --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-threads --with-pcre-jit --with-stream

eea01753-b5be-483b-b3d5-8de39a101b8f.log (110.9 KB)

docker以及操作系统信息如下:
[root@anolisos ~]# docker info
Client: Docker Engine - Community
Version: 26.1.3
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.14.0
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.27.0
Path: /usr/libexec/docker/cli-plugins/docker-compose

Server:
Containers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 4
Server Version: 26.1.3
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: false
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 8b3b7ca2e5ce38e8f31a34f35b2b68ceb8470d89
runc version: v1.1.12-0-g51d5e94
init version: de40ad0
Security Options:
seccomp
Profile: builtin
Kernel Version: 5.10.134-19.an8.x86_64
Operating System: Anolis OS 8.10
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.563GiB
Name: anolisos
ID: 22c6a0b6-2098-493e-b262-7dbc6e62df25
Docker Root Dir: /var/lib/docker
Debug Mode: false
Username: bin12121
Experimental: false
Insecure Registries:
127.0.0.0/8
Registry Mirrors:
https://docker.eli1.top/
https://docker.m.daocloud.io/
https://d2.eli1.top/
Live Restore Enabled: false

[root@anolisos ~]# cat /etc/os-release
NAME=“Anolis OS”
VERSION=“8.10”
ID=“anolis”
ID_LIKE=“rhel fedora centos”
VERSION_ID=“8.10”
PLATFORM_ID=“platform:an8”
PRETTY_NAME=“Anolis OS 8.10”
ANSI_COLOR=“0;31”
HOME_URL=“https://openanolis.cn/

难道说这里的libmaxminddb.zip是需要我自己手动上传到服务器嘛

卸载 openresty 重试一下


chang’sh尝试过了,这个参数也没有修改过,日志输出看上去像是找不到libmaxminddb这个包,我看执行的dockerfile里,没看到那一步有下载

直接去容器里看的话,像是有libmaxminddb这个组件,不确定版本对不对,但是geoip2构建的时候还要去构建这个组件libmaxminddb,有没有可以跳过构建libmaxminddb的地方,或者是我把libmaxminddb的包放到哪里去能打包的时候用的上

会不会是第一步截图里下载软件包我需要填写呢,具体是否有版本要求,geoip2组件好像有很久没有更新,但是libmaxminddb一直在更新


hao’xiang好像是个BUG吧,我找到了官方仓库,但是仓库里的tmp没有libmaxminddb包,麻烦看下能不能上传下
appstore/apps/openresty/1.27.1.2-0-1-focal/build/Dockerfile at f7f1cfbb5489b7d3d594ebbc480d57f052b18d63 · 1Panel-dev/appstore