-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
48 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FROM alpine:3.15.10 as build | ||
|
||
WORKDIR /src | ||
RUN apk add gcc \ | ||
g++ \ | ||
make \ | ||
git \ | ||
cvs \ | ||
zlib-dev | ||
|
||
# 下载并编译 libowfat 库 | ||
RUN cvs -d :pserver:[email protected]:/cvs -z9 co libowfat \ | ||
&& cd libowfat \ | ||
&& make | ||
|
||
RUN git clone git://erdgeist.org/opentracker \ | ||
&& cd opentracker \ | ||
&& make clean && make | ||
|
||
|
||
FROM alpine:3.15.10 | ||
|
||
# XDG目录规范 | ||
ENV XDG_CONFIG_HOME=/config | ||
|
||
COPY --from=build /src/opentracker/opentracker /bin/opentracker | ||
|
||
# 创建配置目录,安装 curl 健康检查使用 | ||
RUN apk add --no-cache curl \ | ||
&& mkdir -p /config | ||
|
||
# 对外暴露配置卷路径 | ||
VOLUME /config | ||
|
||
# 复制配置文件到配置路径 | ||
COPY ./opentracker.conf /config/opentracker.conf | ||
COPY ./whitelist /config/whitelist | ||
COPY ./blacklist /config/blacklist | ||
|
||
EXPOSE 6969/tcp | ||
EXPOSE 6969/udp | ||
|
||
CMD /bin/opentracker -f /config/opentracker.conf |