-
Notifications
You must be signed in to change notification settings - Fork 467
/
Dockerfile.template
28 lines (22 loc) · 1.07 KB
/
Dockerfile.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#
# %%TXT_AUTOGENERATED%%
#
FROM postgres:%%PG_MAJOR%%-%%DEBIAN_VERSION%%
LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS %%POSTGIS_VERSION%% spatial database extension with PostgreSQL %%PG_MAJOR%% %%DEBIAN_VERSION%%" \
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
ENV POSTGIS_MAJOR %%POSTGIS_MAJOR%%
ENV POSTGIS_VERSION %%POSTGIS_VERSION%%
RUN apt-get update \
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
&& apt-get install -y --no-install-recommends \
# ca-certificates: for accessing remote raster files;
# fix: https://github.com/postgis/docker-postgis/issues/307
ca-certificates \
\
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /docker-entrypoint-initdb.d
COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh
COPY ./update-postgis.sh /usr/local/bin