Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-oss
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-oss
Commits
6fa5d63b
Commit
6fa5d63b
authored
Sep 10, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
81fffd22
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
yd-oss-api/Dockerfile
+14
-6
No files found.
yd-oss-api/Dockerfile
View file @
6fa5d63b
# 构建阶段 - 创建包含LibreOffice的基础镜像
# ============================================================
# 构建阶段 - 创建包含 LibreOffice 的基础镜像
# ============================================================
FROM
openjdk:8-jre-slim as base-builder
ENV
LANG=zh_CN.UTF-8 \
...
...
@@ -6,10 +8,12 @@ ENV LANG=zh_CN.UTF-8 \
LC_ALL=zh_CN.UTF-8 \
DEBIAN_FRONTEND=noninteractive
RUN
sed
-i
's/deb.debian.org/mirrors.aliyun.com/g'
/etc/apt/sources.list
&&
\
sed
-i
's/security.debian.org/mirrors.aliyun.com/g'
/etc/apt/sources.list
# 替换为清华源(比 aliyun 更稳定,Release 文件更新及时)
# 同时加上 -o Acquire::Check-Valid-Until=false 作为双保险,避免 Release 过期导致失败
RUN
sed
-i
's|deb.debian.org|mirrors.tuna.tsinghua.edu.cn|g'
/etc/apt/sources.list
&&
\
sed
-i
's|security.debian.org|mirrors.tuna.tsinghua.edu.cn/debian-security|g'
/etc/apt/sources.list
RUN
apt-get update
&&
\
RUN
apt-get update
-o
Acquire::Check-Valid-Until
=
false
&&
\
apt-get install
-y
--no-install-recommends
\
fonts-liberation
\
fonts-dejavu-core
\
...
...
@@ -29,12 +33,15 @@ RUN apt-get update && \
RUN
mkdir
-p
/home/app
WORKDIR
/home/app
# ============================================================
# 最终阶段
# ============================================================
FROM
base-builder
# 只拷贝
jar
包
# 只拷贝
jar
包
COPY
target/yd-oss-api-1.0-SNAPSHOT-exec.jar /home/app/yd-oss-api.jar
#
执行命令启动jar,并设置JVM
内存参数
#
启动命令,设置 JVM
内存参数
ENTRYPOINT
["java", "-Xmx1024m", "-Xms512m", "-jar", "/home/app/yd-oss-api.jar"]
EXPOSE
9106
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment