mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-19 10:06:37 +08:00
chore: comment out CI steps and update Dockerfile for multi-arch support
This commit is contained in:
parent
a45a3d6241
commit
bb4a2e2897
@ -21,7 +21,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
sqlite3 libsqlite3-dev && \
|
sqlite3 libsqlite3-dev && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# TARGETARCH should be set by BuildKit when building multi-arch images.
|
# Declare TARGETARCH so BuildKit can set it correctly.
|
||||||
|
ARG TARGETARCH=amd64
|
||||||
ENV GO111MODULE=on \
|
ENV GO111MODULE=on \
|
||||||
CGO_ENABLED=1 \
|
CGO_ENABLED=1 \
|
||||||
GOOS=linux \
|
GOOS=linux \
|
||||||
@ -37,14 +38,14 @@ RUN go mod download
|
|||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=builder /web/build ./web/build
|
COPY --from=builder /web/build ./web/build
|
||||||
|
|
||||||
# Use double quotes for the -ldflags parameter so that the $(cat VERSION) is expanded.
|
|
||||||
RUN go build -trimpath -ldflags "-s -w -X github.com/songquanpeng/one-api/common.Version=$(cat VERSION)" -o one-api
|
RUN go build -trimpath -ldflags "-s -w -X github.com/songquanpeng/one-api/common.Version=$(cat VERSION)" -o one-api
|
||||||
|
|
||||||
# Final runtime image
|
|
||||||
FROM debian:bullseye
|
FROM debian:bullseye
|
||||||
|
|
||||||
|
RUN rm /var/lib/dpkg/info/libc-bin.*
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
ca-certificates tzdata bash haveged ffmpeg && \
|
ca-certificates tzdata bash haveged libc-bin ffmpeg && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY --from=builder2 /build/one-api /
|
COPY --from=builder2 /build/one-api /
|
||||||
|
Loading…
Reference in New Issue
Block a user