base(openresty-geoip): ship default GeoLite2 mmdb + geoip.conf bootstrap

This commit is contained in:
Haitao Pan 2025-12-06 19:54:43 +08:00
parent 27b15f0d52
commit ada7e5ddc5

View File

@ -1,16 +1,19 @@
FROM openresty/openresty:1.25.3.2-0-bullseye
FROM openresty/openresty:1.25.3.2-0-bookworm
LABEL maintainer="XControl" \
description="OpenResty base image with GeoIP2 libraries and lua-resty-maxminddb"
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates \
libmaxminddb0 libmaxminddb-dev mmdb-bin \
build-essential git luarocks; \
luarocks install lua-resty-maxminddb; \
apt-get update && apt-get upgrade -y; \
apt-get install -y --no-install-recommends ca-certificates libmaxminddb0 libmaxminddb-dev mmdb-bin luarocks; \
apt-get purge -y --auto-remove build-essential git luarocks; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# OpenResty 配置nginx.conf, conf.d/*.conf, lua/
VOLUME ["/etc/openresty/conf"]
# GeoIP 数据目录mmdb 文件)
VOLUME ["/usr/local/openresty/geoip"]
CMD ["nginx", "-g", "daemon off;"]