Skip to content

Feature: Official Dockerhub image #1093

Description

@L3337

At $EMPLOYER, I'm currently pushing for standardization on Postgres + Goose as the official database solution.

The biggest problem is that there is no standard, official public Dockerhub image for Goose, which would make it much easier to spin up a separate migrations image to run as a k8s job. Most of the unofficial Goose images have not been updated in years, and others are doing things like curl ing the amd64 binaries, which then makes it impossible to use on aarch64 servers.

I would like an official FROM scratch image that just contains the binary of each Goose release, available for amd64 or aarch64. Something like:

# syntax=docker/dockerfile:1
FROM golang:1.26-alpine AS build
WORKDIR /app
RUN apk update
# This should be the same as the version it is tagged as
ARG VERSION
RUN GOPATH=/app go install github.com/pressly/goose/v3/cmd/goose@${VERSION}

FROM scratch
WORKDIR /
COPY --from=build /app/bin/goose /
ENTRYPOINT ["./goose"]

From that base image, we could then choose the version of Goose that we want, COPY the migrations folder, and run it from a k8s job with appropriate env. vars.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions