[ci][docker]: use matrix to reduce build time & change base image to busybox (#417)

* ci: use matrix to reduce build time

* docker: change base image to busybox

* reuse workflows

* only download ipinfo db on tag pushes

* goreleaser
This commit is contained in:
UUBulb
2024-09-02 22:13:13 +08:00
committed by GitHub
parent 989c9f9740
commit 23751440c6
6 changed files with 211 additions and 147 deletions

View File

@@ -1,16 +1,8 @@
# latest 镜像还没有 riscv64 https://hub.docker.com/_/alpine/tags
FROM alpine:edge
FROM busybox:stable-musl
ARG TARGETOS
ARG TARGETARCH
RUN apk update && \
apk upgrade --no-cache && \
apk add --no-cache tzdata && \
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo 'Asia/Shanghai' >/etc/timezone && \
rm -rf /var/cache/apk/*
COPY ./script/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
@@ -19,4 +11,6 @@ COPY dist/dashboard-${TARGETOS}-${TARGETARCH} ./app
VOLUME ["/dashboard/data"]
EXPOSE 80 5555
ARG TZ=Asia/Shanghai
ENV TZ=$TZ
ENTRYPOINT ["/entrypoint.sh"]