DB 적재 초기구조
This commit is contained in:
25
Dockerfile.postgres
Normal file
25
Dockerfile.postgres
Normal file
@@ -0,0 +1,25 @@
|
||||
FROM postgres:16-bookworm AS builder
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
git \
|
||||
libmaxminddb-dev \
|
||||
postgresql-server-dev-16 && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /tmp/maxminddb_fdw
|
||||
RUN git clone https://github.com/klayemore/maxminddb_fdw.git . && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
FROM postgres:16-bookworm
|
||||
COPY --from=builder /usr/lib/postgresql/16/lib/maxminddb_fdw.so /usr/lib/postgresql/16/lib/maxminddb_fdw.so
|
||||
COPY --from=builder /usr/share/postgresql/16/extension/maxminddb_fdw* /usr/share/postgresql/16/extension/
|
||||
|
||||
RUN mkdir -p /data && chown postgres:postgres /data
|
||||
|
||||
ENV POSTGRES_DB=geoip
|
||||
ENV POSTGRES_USER=geoip_admin
|
||||
ENV POSTGRES_PASSWORD=geoip_admin
|
||||
Reference in New Issue
Block a user