-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile.Ubuntu
35 lines (28 loc) · 1.1 KB
/
Dockerfile.Ubuntu
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
FROM eclipse-temurin:8u412-b08-jre
WORKDIR /danmuji
# 设置时区并安装必要的软件包
RUN apt update && apt install -y --no-install-recommends unzip wget curl git build-essential \
&& git clone https://github.com/ncopa/su-exec.git /tmp/su-exec \
&& cd /tmp/su-exec \
&& make \
&& cp su-exec /usr/local/bin/su-exec \
&& chmod +x /usr/local/bin/su-exec \
&& rm -rf /tmp/su-exec \
&& apt-get purge -y --auto-remove git build-essential \
&& ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apt-get install -y --no-install-recommends tzdata \
&& dpkg-reconfigure --frontend noninteractive tzdata \
&& rm -rf /var/lib/apt/lists/* /tmp/*
# 复制应用程序和入口脚本
COPY Bilibili_Danmuji/danmuji.jar /danmuji/danmuji.jar
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
# 确保入口脚本可执行
RUN chmod +x /usr/local/bin/entrypoint.sh
# 暴露应用程序端口
EXPOSE 23333
# 设置环境变量
ENV JAVA_OPTS=""
ENV JAVA_OPTS2=""
# 设置入口点
ENTRYPOINT ["sh", "/usr/local/bin/entrypoint.sh"]