mirror of
				https://github.com/songquanpeng/one-api.git
				synced 2025-11-04 15:53:42 +08:00 
			
		
		
		
	Merge branch 'test/ci'
This commit is contained in:
		@@ -21,7 +21,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
 | 
			
		||||
    sqlite3 libsqlite3-dev && \
 | 
			
		||||
    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 \
 | 
			
		||||
    CGO_ENABLED=1 \
 | 
			
		||||
    GOOS=linux \
 | 
			
		||||
@@ -37,14 +38,14 @@ RUN go mod download
 | 
			
		||||
COPY . .
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
# Final runtime image
 | 
			
		||||
FROM debian:bullseye
 | 
			
		||||
 | 
			
		||||
RUN rm /var/lib/dpkg/info/libc-bin.*
 | 
			
		||||
 | 
			
		||||
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/*
 | 
			
		||||
 | 
			
		||||
COPY --from=builder2 /build/one-api /
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user