
A Docker container running PostgreSQL/PostGIS, based on an publicly available image on the Kartoza repository (https://hub.docker.com/r/kartoza/postgis/). The image has been realized for educational purposes using another image, GeoServer (https://hub.docker.com/r/mfortunato/geoserver/), to work together as a support and testing software for a personalized demo of web mapping. The use of the application requires the simultaneous run of two containers created with the reference image.
To build the application geoserver/www/demo:
git clone https://bitbucket.org/mfortunato/edugeo_dircd edugeo_dir/edugeo
docker-compose up -dlocalhost:8080/geoserver/www/demo/mapindex.html
4.Enjoy it!Note: this image has more tags associated with it. We recommend the use of the final version, with lst tag.
The easiest method to download images on your system consists of:
docker pull mfortunato/geoserver docker pull mfortunato/postgis
While, for the creation of running containers, the commands are:
sudo docker run --name "postgis" -d -t mfortunato/postgis sudo docker run --name "geoserver" --link postgis:postgis -p 8080:8080 -d -t mfortunato/geoserver
To simplify, it is recommended to use a .yml script which makes the downloading of images, the creation of the two containers, their connection and their start-up, in a single step. The script must be launched with the tool Docker Compose (link).
The used docker-compose.yml file contains the following script:
postgis: image: mfortunato/postgis:lst geoserver: image: mfortunato/geoserver:lst ports: - "8080:8080" links: - postgis volumes: - $PWD/www:/opt/geoserver/data_dir/www/
Two containers are defined, as "postgis" and "geoserver"; this is the same value that is associated with the flag --name of docker run described above. For each container is defined the starting image (eg. image: mfortunato/postgis:lst). In the case of "geoserver", it is also defined the matching of the ports (ports:-"8080:8080") and the link with the “postgis” container (links:-postgis). The option volumes connects the www folder to the /opt/geoserver/data_dir/www/ position, in the "geoserver" container. So it becomes a shared folder between the host and the container.
The .yml files must be placed in a edugeo named folder. The folder, containing the docker-compose.yml file and the www folder. The edugeo folder can be downloaded locally from a Bitbucket repository, with shell command:
git clone https://bitbucket.org/mfortunato/edugeo_dir
After, get in edugeo directory through terminal and give the docker-compose up -d command. To close the session, use docker-compose stop. These commands must be run in the directory that contains docker-compose.yml.
Note: GeoServer default user is "admin" and the password is "geoserver"; while PostgreSQL default user is "docker" with “docker” password. Both are editable. The access to PostGIS can be done via pfm (Form Postgres), after making sure you have installed it on your host (sudo apt-get install pfm). GeoServer is accessible via GUI by typing in browser: localhost:8080/geoserver/web.
Docker volumes can be used to share a folder between host and container. Inside edugeo, in addition to .yml files, there is a www folder, intended to serve as a volume. The folder is named www because it create a shared folder between the container GeoServer and the edugeo folder, replacing a folder with the same name on existing path (/opt/geoserver/data_dir/www/). WWW is a GeoServer default directory, needed to run the web map client. The creation of a volume within a pre-existing folder, delete all the files in the same folder, replacing them with those of volume-folder. For this reason it was decided to add into the www folder of edugeo also the default files inside the www folder at the installation of GeoServer, so that the same functions are maintained.
In the case of the use of docker-compose.yml file described above, the volume is automatically built with containers, by running docker-compose up -d command. Changing the contents of the local folder, the change also occurs in the same folder within the container.
PostgreSQL and PostGIS are licensed under the GPL.


探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务