At the time of development, I was unable to find a docker image that is installed with the PostgreSQL15, Postgis3.0, latest TimescaleDB 2.10.3 and 3DCityDB 4.1.0. I had to build my own Docker image. This section documents how the Docker image is built.
Go to the terminal on your Ubuntu machine. Run this command to download the masa3db package.
$ curl -L https://github.com/chenkianwee/yun2infinity/archive/refs/tags/x.x.x.zip > yun2infinity-x.x.x.zipUnzip the file with this command.
$ unzip yun2infinity-x.x.x.zipGo into the yun2infinity-x.x.x/timescale-3dcitydb folder with this command. You will see these files.
$ cd yun2infinity-x.x.x/timescale-3dcitydb $ lscreate_extension_postgis_ext.sh Dockerfilea. Below is the Dockerfile for creating the image. The image is based on the timescale image. The 3Dcitydb is downloaded and copied into the container. Lastly, an initialisation script is copied into this image. This scripts will initialise some postgis extension when the container is created as they are placed in the docker-entrypoint-initdb.d folder.
FROM timescale/timescaledb-ha:pg15.2-ts2.10.3-all-oss MAINTAINER chenkianwee chenkianwee@gmail.com USER root RUN apt-get update RUN apt-get -y upgrade RUN apt-get -y install wget RUN apt-get -y install unzip RUN apt-get -y install nano RUN wget https://github.com/3dcitydb/3dcitydb/releases/download/v4.1.0/3dcitydb-4.1.0.zip RUN unzip 3dcitydb-4.1.0.zip RUN rm 3dcitydb-4.1.0.zip COPY create_extension_postgis_ext.sh /docker-entrypoint-initdb.d USER postgresRun this command to build the image. This command will find the Dockerfile in the directory and build the image according to the file. Refer to this website for a quick understanding of the Dockerfile.
$ sudo docker build . -t chenkianwee/timescale-3dcitydb:x.x.x-x.x.xThe image will be built. If successful you will see the “Successfully built” message.
Push the image to your docker hub. Once uploaded, you will be able to pull from the repository.
$ sudo docker login $ sudo docker push yourName/ImageName:tag
Docker Image for Raspberry Pi (not working)