Tag: docker postgis

在Dockerfile中启用Postgis扩展Postgres

我如何在Dockerfile中启用Postgis扩展? Postgres安装已经在运行 这是Ubuntu中的命令: sudo -u postgres psql -c "CREATE EXTENSION postgis;" 我的Dockerfile: # Set the base image to Ubuntu FROM ubuntu:14.04 # Update the repository sources list RUN apt-get update -y ################## BEGIN INSTALLATION ###################### # Postgres with Postgis # Install wget RUN apt-get install wget -y # Setup Postgres repository RUN wget –quiet -O […]

Docker入门9.3的Postgres

这是我的Dockerfile来安装Postgres。 # Set the base image to Ubuntu FROM ubuntu:14.04 # Update the repository sources list RUN apt-get update -y ################## BEGIN INSTALLATION ###################### # Install wget RUN apt-get install wget -y # Setup Postgres repository RUN wget –quiet -O – https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add – # Add Postgres repository RUN sh -c "echo […]

如何在docker中为postgresql创buildpostgis扩展?

尝试创buildPostgis扩展时遇到错误。 这是我的dockerfile的样子。 from postgres RUN apt-get update && apt-get install postgis -y ADD /create_postgis_extension.sh /docker-entrypoint-initdb.d/ create.bla-bla..sh #!/bin/sh POSTGRES="gosu postgres postgres" $POSTGRES –single -E <<EOSQL CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology; EOSQL 这是运行图像时的错误 后端>语句:CREATE EXTENSION postgis; 错误:typesaddbandarg []不存在语句:CREATE EXTENSION postgis; 后端>语句:CREATE EXTENSION postgis_topology; 后端>错误:未安装必需的扩展名“postgis” 我显然做错了什么,但我不知道是什么。 为什么postgis没有安装,如果我已经安装postgis与apt-get。