base(openresty-geoip): ship default GeoLite2 mmdb + geoip.conf bootstrap
This commit is contained in:
parent
0aeaaa3934
commit
d191f87954
@ -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;"]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user