-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathDockerfile
39 lines (25 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM node:alpine as build-web
WORKDIR /build
COPY . .
RUN corepack enable
RUN corepack prepare pnpm@latest --activate
RUN pnpm install
RUN pnpm build
FROM golang:1.20-bullseye as build-bundle
ENV CGO_ENABLED=0
WORKDIR /build
COPY --from=build-web /build/dist web
COPY --from=build-web /build/wing wing
RUN apt-get update && apt-get install -y llvm clang git make
RUN cd wing && make OUTPUT=daed WEB_DIST=/build/web/ bundle
RUN apt-get clean autoclean && apt-get autoremove -y && rm -rf /var/lib/{apt,dpkg,cache,log}/
FROM alpine
LABEL org.opencontainers.image.source=https://github.com/daeuniverse/daed
RUN mkdir -p /usr/local/share/daed/
RUN mkdir -p /etc/daed/
RUN wget -O /usr/local/share/daed/geoip.dat https://github.com/v2rayA/dist-v2ray-rules-dat/raw/master/geoip.dat
RUN wget -O /usr/local/share/daed/geosite.dat https://github.com/v2rayA/dist-v2ray-rules-dat/raw/master/geosite.dat
COPY --from=build-bundle /build/wing/daed /usr/local/bin
EXPOSE 2023
CMD ["daed"]
ENTRYPOINT ["daed", "run", "-c", "/etc/daed"]