Skip to content

Commit 8ed42c9

Browse files
committed
readme
1 parent 4ba4b90 commit 8ed42c9

4 files changed

Lines changed: 195 additions & 6 deletions

File tree

Dockerfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ ARG PGSODIUM_VERSION
1818
RUN apk add --no-cache \
1919
git \
2020
build-base \
21-
clang17 \
22-
llvm17 \
2321
postgresql-dev \
2422
curl \
2523
# PostGIS dependencies
@@ -34,11 +32,11 @@ RUN apk add --no-cache \
3432

3533
WORKDIR /build
3634

37-
# pgvector
35+
# pgvector (disable LLVM bitcode)
3836
RUN git clone --branch v${PGVECTOR_VERSION} --depth 1 https://github.com/pgvector/pgvector.git && \
3937
cd pgvector && \
40-
make -j$(nproc) && \
41-
make install
38+
make OPTFLAGS="" USE_PGXS=1 WITH_LLVM=no -j$(nproc) && \
39+
make USE_PGXS=1 WITH_LLVM=no install
4240

4341
# PostGIS with Tiger geocoder and address standardizer
4442
RUN curl -L https://download.osgeo.org/postgis/source/postgis-${POSTGIS_VERSION}.tar.gz | tar xz && \
@@ -73,5 +71,5 @@ RUN apk add --no-cache \
7371
COPY --from=builder /usr/local/lib/postgresql/ /usr/local/lib/postgresql/
7472
COPY --from=builder /usr/local/share/postgresql/ /usr/local/share/postgresql/
7573

76-
LABEL org.opencontainers.image.source="https://github.com/constructive/docker"
74+
LABEL org.opencontainers.image.source="https://github.com/constructive-io/docker"
7775
LABEL org.opencontainers.image.description="PostgreSQL 17 with pgvector, PostGIS, Tiger geocoder, and pgsodium"

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Constructive
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Constructive Docker
2+
3+
<p align="center" width="100%">
4+
<img src="./img/logo.svg" alt="constructive" width="80"><br />
5+
</p>
6+
7+
Lean PostgreSQL 17 image with essential extensions for modern applications.
8+
9+
## Extensions
10+
11+
| Extension | Description |
12+
|-----------|-------------|
13+
| [pgvector](https://github.com/pgvector/pgvector) | Vector similarity search for embeddings |
14+
| [PostGIS](https://postgis.net/) | Spatial and geographic data |
15+
| [Tiger Geocoder](https://postgis.net/docs/Extras.html#Tiger_Geocoder) | US address geocoding |
16+
| [pgsodium](https://github.com/michelp/pgsodium) | Encryption using libsodium |
17+
18+
## Usage
19+
20+
```bash
21+
# Pull the image
22+
docker pull ghcr.io/constructive-io/docker:latest
23+
24+
# Run
25+
docker run -d \
26+
--name postgres \
27+
-e POSTGRES_PASSWORD=secret \
28+
-p 5432:5432 \
29+
ghcr.io/constructive-io/docker:latest
30+
```
31+
32+
Enable extensions as needed:
33+
34+
```sql
35+
CREATE EXTENSION vector;
36+
CREATE EXTENSION postgis;
37+
CREATE EXTENSION fuzzystrmatch;
38+
CREATE EXTENSION address_standardizer;
39+
CREATE EXTENSION postgis_tiger_geocoder;
40+
CREATE EXTENSION pgsodium;
41+
```
42+
43+
## Build
44+
45+
```bash
46+
make build # Build image
47+
make test # Build and verify extensions
48+
make run # Run container
49+
make shell # psql into container
50+
make clean # Remove image
51+
```
52+
53+
## GitHub Actions
54+
55+
Images are automatically built and pushed to `ghcr.io` on:
56+
- Push to `main`
57+
- Tagged releases (`v*`)
58+
59+
Multi-arch support: `linux/amd64` and `linux/arm64`
60+
61+
## License
62+
63+
MIT License - see [LICENSE](./LICENSE)

0 commit comments

Comments
 (0)