How do you run goose in docker?

61 Views Asked by At

I have installed postgres and goose in docker.

But I cannot create a database nor tables using goose.

I ran this:

docker run --name postgres-0 -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 postgres:alpine

I see in docker desktop that postgres comtainer starts

cd into the sql/schema directory and run:

docker run --hostname "postgresql://postgres:postgres@localhost:5432/blogator up" gomicro/goosep

But the table was not created.

Any ideas about what the problem is?

0

There are 0 best solutions below