代码拉取完成,页面将自动刷新
ARG ALPINE=alpine:3.20
FROM ${ALPINE} AS verify
ARG ARCH
ARG TAG
WORKDIR /verify
ADD https://github.com/k3s-io/k3s/releases/download/${TAG}/sha256sum-${ARCH}.txt .
RUN set -x \
&& apk upgrade -U \
&& apk add \
curl file \
&& apk cache clean \
&& rm -rf /var/cache/apk/*
RUN if [ "${ARCH}" == "amd64" ]; then \
export ARTIFACT="k3s"; \
elif [ "${ARCH}" == "arm" ]; then \
export ARTIFACT="k3s-armhf"; \
elif [ "${ARCH}" == "arm64" ]; then \
export ARTIFACT="k3s-arm64"; \
elif [ "${ARCH}" == "s390x" ]; then \
export ARTIFACT="k3s-s390x"; \
fi \
&& curl --output ${ARTIFACT} --fail --location https://github.com/k3s-io/k3s/releases/download/${TAG}/${ARTIFACT} \
&& grep -E " k3s(-arm\w*|-s390x)?$" sha256sum-${ARCH}.txt | sha256sum -c \
&& mv -vf ${ARTIFACT} /opt/k3s \
&& chmod +x /opt/k3s \
&& file /opt/k3s
FROM ${ALPINE}
ARG ARCH
ARG TAG
RUN apk upgrade -U \
&& apk add \
jq libselinux-utils procps \
&& apk cache clean \
&& rm -rf /var/cache/apk/*
COPY --from=verify /opt/k3s /opt/k3s
COPY scripts/upgrade.sh /bin/upgrade.sh
ENTRYPOINT ["/bin/upgrade.sh"]
CMD ["upgrade"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。