1 Star 0 Fork 0

打补丁的狮子/project_38578615

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
Zero 提交于 2023-11-05 17:06 . chore(release): bumped version to v2.0.24
FROM --platform=${BUILDPLATFORM} whatwewant/builder-go:v1.21-1 as builder
RUN wget -O /Country.mmdb https://github.com/doreamon-design/clash/releases/download/v2.0.8/Country.mmdb
WORKDIR /build
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY . .
ARG TARGETOS
ARG TARGETARCH
RUN CGO_ENABLED=0 \
GOOS=${TARGETOS} \
GOARCH=${TARGETARCH} \
go build \
-trimpath \
-ldflags '-w -s -buildid=' \
-v -o /clash ./cmd/clash
FROM --platform=${BUILDPLATFORM} whatwewant/builder-node:v20-1 as builder-ui
RUN git clone https://github.com/doreamon-design/clash-dashboard -b master /build
WORKDIR /build
RUN yarn
RUN yarn build
# RUN npm i --legacy-peer-deps
# RUN NODE_OPTIONS="--openssl-legacy-provider" yarn build
FROM whatwewant/alpine:v3.17-1
ENV TZ=Asia/Shanghai
LABEL org.opencontainers.image.source="https://github.com/doreamon-design/clash"
ENV CLASH_OVERRIDE_EXTERNAL_UI_DIR=/etc/clash/ui
ENV CLASH_CONFIG_FILE=/etc/clash/config.yaml
ENV CLASH_HOME_DIR=/etc/clash
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder-ui /build/dist /etc/clash/ui
COPY --from=builder /Country.mmdb /etc/clash/
COPY --from=builder /clash /usr/bin
CMD clash
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/PatchLion_admin/clash.git
git@gitee.com:PatchLion_admin/clash.git
PatchLion_admin
clash
project_38578615
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385