ARG before FROM is not visible in RUN; set APK_MIRROR default inside the runtime stage so sed does not produce broken https:///alpine URLs in CI. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+1
-2
@@ -51,10 +51,9 @@ RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
&& go build -trimpath -ldflags="-w -s" -o /luminary-recover ./cmd/luminary-recover
|
||||
|
||||
ARG IMAGE_PREFIX=
|
||||
ARG APK_MIRROR=mirrors.aliyun.com
|
||||
FROM ${IMAGE_PREFIX}alpine:3.20
|
||||
|
||||
ARG APK_MIRROR
|
||||
ARG APK_MIRROR=mirrors.aliyun.com
|
||||
RUN sed -i "s/dl-cdn.alpinelinux.org/${APK_MIRROR}/g" /etc/apk/repositories \
|
||||
&& apk add --no-cache ca-certificates tzdata tini
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
ARG IMAGE_PREFIX=docker.1panel.live/library/
|
||||
ARG APK_MIRROR=mirrors.aliyun.com
|
||||
FROM ${IMAGE_PREFIX}alpine:3.20 AS runtime
|
||||
ARG APK_MIRROR
|
||||
ARG APK_MIRROR=mirrors.aliyun.com
|
||||
RUN sed -i "s/dl-cdn.alpinelinux.org/${APK_MIRROR}/g" /etc/apk/repositories \
|
||||
&& apk add --no-cache ca-certificates tini
|
||||
|
||||
|
||||
Reference in New Issue
Block a user