Skip to content

Commit af50872

Browse files
authored
fix: use fixed version of postgres for local development
Resolves an issue which caused local Postgres instances to fail to start, due to Postgres 18 changes to how it handles PGDATA.
1 parent 5ac1f33 commit af50872

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/cloud/sql/sql.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func (l *LocalSqlServer) start() error {
136136
return err
137137
}
138138

139-
err = dockerClient.ImagePull("postgres:latest", types.ImagePullOptions{
139+
err = dockerClient.ImagePull("postgres:17.6", types.ImagePullOptions{
140140
All: false,
141141
})
142142
if err != nil {
@@ -164,7 +164,7 @@ func (l *LocalSqlServer) start() error {
164164
_ = newLis.Close()
165165

166166
l.containerId, err = dockerClient.ContainerCreate(&container.Config{
167-
Image: "postgres",
167+
Image: "postgres:17.6",
168168
Env: []string{
169169
"POSTGRES_PASSWORD=localsecret",
170170
"PGDATA=/var/lib/postgresql/data/pgdata",

0 commit comments

Comments
 (0)