A database migration tool for Go. Supports SQL migrations and Go functions.
2.7K
Lightweight container image for the goose database migration CLI. The image embeds the official binary built from github.com/pressly/goose and runs as a non-root user on a distroless base.
goose binary with all database drivers enabled by default.linux/amd64, linux/arm64, …) via Docker Buildx./migrations as the working directory so mounting migrations is straightforward.docker run --rm \
-v "$(pwd)/migrations:/migrations:ro" \
-e GOOSE_DRIVER=sqlite3 \
-e GOOSE_DBSTRING=./example.db \
juhokoskela/goose:latest \
status
Environment variables map directly to the CLI flags:
GOOSE_DRIVER – database driver (postgres, mysql, sqlite3, …).GOOSE_DBSTRING – connection string or DSN.GOOSE_MIGRATION_DIR – optional override if migrations live outside /migrations.latest – default build including all drivers. Based on the latest version of Goose and Go.git clone https://github.com/juhokoskela/goose.git
cd goose
docker build -t goose:local .
Alternatively, build with Goose build tags if you want a custom variant with unused drivers removed for example
git clone https://github.com/juhokoskela/goose.git
cd goose
docker build -t goose:local --build-arg GOOSE_BUILD_TAGS="no_mysql no_postgres" .
Content type
Image
Digest
sha256:7cbac7622…
Size
14.6 MB
Last updated
18 days ago
docker pull juhokoskela/goose