支持迁移对象存储到 OSS
This commit is contained in:
@@ -16,6 +16,9 @@ RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
--mount=type=cache,target=/root/.cache/go-build \
|
||||
CGO_ENABLED=0 GOOS=linux go build -o /out/hfb-api ./cmd/api
|
||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
--mount=type=cache,target=/root/.cache/go-build \
|
||||
CGO_ENABLED=0 GOOS=linux go build -o /out/hfb-storage-migrate ./cmd/storage-migrate
|
||||
|
||||
FROM alpine:3.22
|
||||
|
||||
@@ -30,6 +33,7 @@ RUN sed -i 's#https\?://dl-cdn.alpinelinux.org/alpine#https://mirrors.aliyun.com
|
||||
&& mkdir -p /app/logs \
|
||||
&& chown app:app /app/logs
|
||||
COPY --from=build /out/hfb-api /app/hfb-api
|
||||
COPY --from=build /out/hfb-storage-migrate /app/hfb-storage-migrate
|
||||
COPY --from=build /go/bin/goose /app/goose
|
||||
COPY --from=build /src/migrations /app/migrations
|
||||
USER app:app
|
||||
|
||||
Reference in New Issue
Block a user