-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(docker): rework workflow (3rd time) (#289)
Signed-off-by: hero-intelligent <[email protected]> Co-authored-by: kev <[email protected]>
- Loading branch information
1 parent
1744638
commit 79dd55a
Showing
4 changed files
with
175 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# ATTENTION This part below is for publishing purpose only | ||
|
||
ARG DAED_VERSION | ||
|
||
FROM golang:1.21-bookworm as build | ||
|
||
RUN \ | ||
apt-get update; apt-get install -y git make llvm-15 clang-15; \ | ||
apt-get clean autoclean && apt-get autoremove -y && rm -rf /var/lib/{apt,dpkg,cache,log}/ | ||
|
||
# build bundle process | ||
ENV CGO_ENABLED=0 | ||
ENV CLANG=clang-15 | ||
ARG DAED_VERSION | ||
|
||
WORKDIR /build | ||
|
||
COPY ./dist/ ./web/ | ||
COPY ./wing/ ./wing/ | ||
|
||
WORKDIR /build/wing | ||
|
||
RUN make APPNAME=daed VERSION=$DAED_VERSION OUTPUT=daed WEB_DIST=/build/web/ bundle | ||
|
||
|
||
FROM alpine as prod | ||
|
||
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; \ | ||
wget -O /usr/local/share/daed/geosite.dat https://github.com/v2rayA/dist-v2ray-rules-dat/raw/master/geosite.dat | ||
COPY --from=build /build/wing/daed /usr/local/bin | ||
|
||
EXPOSE 2023 | ||
|
||
CMD ["daed", "run", "-c", "/etc/daed"] |