docker: fix image base to use latest distroless image
Some checks failed
/ push (push) Has been cancelled
Some checks failed
/ push (push) Has been cancelled
This commit is contained in:
parent
68fced6618
commit
06cd155f72
|
@ -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
|
||||||
|
|
4
db/db.go
4
db/db.go
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue