-
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
1 changed file
with
7 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,20 @@ | ||
FROM debian:bookworm-slim AS build | ||
|
||
WORKDIR /src | ||
|
||
RUN apt-get update -y\ | ||
&& apt-get -y install gcc \ | ||
g++ \ | ||
make \ | ||
git \ | ||
cvs \ | ||
zlib1g-dev | ||
|
||
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 -j4 | ||
|
||
|
||
FROM debian:bookworm-slim | ||
|
||
# XDG目录规范 | ||
ENV XDG_CONFIG_HOME=/config | ||
|
||
COPY --from=build /src/opentracker/opentracker /bin/opentracker | ||
|
||
# 安装 curl 用于健康检查,并创建配置目录 | ||
RUN apt update -y\ | ||
&& apt install curl -y \ | ||
&& apt install curl opentracker -y \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& mkdir -p /config | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
VOLUME ["/config"] | ||
VOLUME ["/etc/opentracker"] | ||
|
||
COPY ./opentracker.conf /config/opentracker.conf | ||
COPY ./whitelist /config/whitelist | ||
COPY ./blacklist /config/blacklist | ||
COPY ./opentracker.conf /etc/opentracker/opentracker.conf | ||
|
||
EXPOSE 6969/tcp | ||
EXPOSE 6969/tcp | ||
EXPOSE 6969/udp | ||
|
||
CMD ["/bin/opentracker", "-f", "/config/opentracker.conf"] | ||
CMD ["/bin/opentracker", "-f", "/usr/bin/opentracker.conf"] | ||
|