1 Star 0 Fork 51

wchnan/三丙-高并发点赞

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile 1.02 KB
一键复制 编辑 原始数据 按行查看 历史
baigod 提交于 2024-08-04 10:30 . Initial commit
FROM registry.cn-hangzhou.aliyuncs.com/sanbin/jdk17-springboot332:latest as base
WORKDIR /app
COPY . .
RUN mvn -s settings_default.xml -U -B -T 0.8C clean install -DskipTests
#分层
FROM registry.cn-hangzhou.aliyuncs.com/sanbin/openjdk17:bullseye-slim as builder
WORKDIR /app
COPY --from=base /app/target/application.jar application.jar
RUN java -Djarmode=tools -jar application.jar extract --layers --destination extracted
# 执行
FROM registry.cn-hangzhou.aliyuncs.com/sanbin/openjdk17:bullseye-slim
WORKDIR /app
COPY --from=builder /app/extracted/dependencies/ ./
COPY --from=builder /app/extracted/spring-boot-loader/ ./
COPY --from=builder /app/extracted/snapshot-dependencies/ ./
COPY --from=builder /app/extracted/application/ ./
COPY --from=base /app/start.sh .
ENV TZ=Asia/Shanghai
RUN mkdir -p /app/logs && \
mkdir -p /app/logs/gc && \
chmod 700 -R /app/logs
RUN echo 'networkaddress.cache.ttl=60' >> /etc/java-17-openjdk/security/java.security \
&& chmod a+x *.sh \
&& mv start.sh /usr/bin
CMD ["start.sh"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wchnan/hc-Like.git
git@gitee.com:wchnan/hc-Like.git
wchnan
hc-Like
三丙-高并发点赞
master

搜索帮助