1 Commits

Author SHA1 Message Date
4e305d67e3 feat: run managed containers from PawSQL image
All checks were successful
Build and Push Image / docker-build-and-push (push) Successful in 5m3s
Test and Release PawSQL / test (push) Successful in 44s
Test and Release PawSQL / release (push) Successful in 8s
2026-09-15 20:38:01 -04:00
2 changed files with 4 additions and 2 deletions

View File

@@ -8,7 +8,8 @@ COPY cmd ./cmd
COPY internal ./internal COPY internal ./internal
RUN CGO_ENABLED=0 go build -trimpath -ldflags='-s -w' -o /pawsql ./cmd/pawsql RUN CGO_ENABLED=0 go build -trimpath -ldflags='-s -w' -o /pawsql ./cmd/pawsql
FROM gcr.io/distroless/static-debian12:nonroot FROM alpine:3.21
RUN apk add --no-cache ca-certificates docker-cli
COPY --from=build /pawsql /usr/local/bin/pawsql COPY --from=build /pawsql /usr/local/bin/pawsql
ENTRYPOINT ["/usr/local/bin/pawsql"] ENTRYPOINT ["/usr/local/bin/pawsql"]
CMD ["--config", "/etc/pawsql/Barkfile"] CMD ["--config", "/etc/pawsql/Barkfile"]

View File

@@ -33,10 +33,11 @@ docker build -t pawsql .
docker run --rm --publish 5432:5432 \ docker run --rm --publish 5432:5432 \
--volume "$PWD/Barkfile:/etc/pawsql/Barkfile:ro" \ --volume "$PWD/Barkfile:/etc/pawsql/Barkfile:ro" \
--volume "$PWD/tls:/etc/pawsql/tls:ro" \ --volume "$PWD/tls:/etc/pawsql/tls:ro" \
--volume /var/run/docker.sock:/var/run/docker.sock \
pawsql pawsql
``` ```
The provided image contains only PawSQL and is suitable for external `upstream` routes. Managed PostgreSQL routes require native PawSQL or a custom image that supplies a Docker CLI and access to the Docker Engine, typically through the Docker socket. The supplied image includes the Docker CLI so managed `postgres` routes can create, start, and stop their containers through the mounted Docker socket. The socket grants PawSQL root-equivalent control of the Docker host; mount it only for trusted Barkfiles and trusted administrators.
## Barkfile ## Barkfile