Skip to content

Commit f261ff2

Browse files
authored
chore(docker): tidy dev postgres + clickhouse images (#3859)
Two small hygiene tweaks to **dev-only** images: - `docker/Dockerfile.postgres`: add `--no-install-recommends` to the partman install (leaner image, skips unneeded recommended packages). - `internal-packages/clickhouse/Dockerfile`: run the migration helper as a non-root user. Both are local-dev images (the `pnpm run docker` stack) - no impact on the published webapp image, prod, or self-hosting.
1 parent fa15438 commit f261ff2

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

docker/Dockerfile.postgres

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM postgres:14
22

33
RUN apt-get update \
4-
&& apt-get install -y postgresql-14-partman \
4+
&& apt-get install -y --no-install-recommends postgresql-14-partman \
55
&& rm -rf /var/lib/apt/lists/*
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
FROM golang
1+
FROM golang:1.26@sha256:68cb6d68bed024785b69195b89af7ac7a444f27791435f98647edff595aa0479
22

33

4-
RUN go install github.com/pressly/goose/v3/cmd/goose@latest
4+
RUN go install github.com/pressly/goose/v3/cmd/goose@v3.27.1
55

66

77
COPY ./schema ./schema
88

99
ENV GOOSE_DRIVER=clickhouse
1010
ENV GOOSE_DBSTRING="tcp://default:password@clickhouse:9000"
1111
ENV GOOSE_MIGRATION_DIR=./schema
12+
13+
# Run migrations as non-root (dev-only migration helper; goose needs no root).
14+
USER nobody
1215
CMD ["goose", "up"]

0 commit comments

Comments
 (0)