docker: fix image base to use latest distroless image
Some checks failed
/ push (push) Has been cancelled

This commit is contained in:
Tigor Hutasuhut 2024-05-12 11:56:20 +07:00
parent 68fced6618
commit 06cd155f72
2 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@ ENV REDMAGE_RUNTIME_VERSION=unknown
RUN --mount=type=cache,target=/root/.cache/go-build make build-docker RUN --mount=type=cache,target=/root/.cache/go-build make build-docker
FROM gcr.io/distroless/base:nonroot FROM gcr.io/distroless/base:latest
WORKDIR /app WORKDIR /app
COPY --from=builder /app/redmage /app/redmage COPY --from=builder /app/redmage /app/redmage
ENV REDMAGE_FLAGS_CONTAINERIZED=true ENV REDMAGE_FLAGS_CONTAINERIZED=true

View file

@ -43,11 +43,11 @@ func Open(cfg *config.Config) (*sql.DB, error) {
goose.SetBaseFS(Migrations) goose.SetBaseFS(Migrations)
if err := goose.SetDialect(driver); err != nil { if err := goose.SetDialect(driver); err != nil {
return db, errs.Wrapw(err, "failed to set goose dialect", "dialect", driver) return db, errs.Wrapw(err, "failed to set goose dialect", "dialect", driver, "dsn", dsn)
} }
if err := goose.Up(db, "db/migrations"); err != nil { if err := goose.Up(db, "db/migrations"); err != nil {
return db, errs.Wrapw(err, "failed to migrate database", "dialect", driver) return db, errs.Wrapw(err, "failed to migrate database", "dialect", driver, "dsn", dsn)
} }
} }
return db, err return db, err