3 Star 26 Fork 7

京东开源/joylive-agent

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 974 Bytes
一键复制 编辑 原始数据 按行查看 历史
清源 提交于 2024-08-26 12:15 . Update dockerfile
# Build an image using JDK 17
FROM openjdk:17-oracle AS builder
# Set up a working directory
WORKDIR /app
# Copy the project file to the working directory
COPY . .
# Build the project
RUN ./mvnw clean package -DskipTests=true
# Use a smaller base image
FROM alpine
# Set the time zone and locale
ARG TZ="Asia/Shanghai"
ENV TZ ${TZ}
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV LANGUAGE en_US:en
RUN set -ex \
&& apk add --no-cache bash tzdata unzip ca-certificates \
&& ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo ${TZ} > /etc/timezone
# Create a target directory
RUN mkdir -p /joylive
# Copy the zip file generated during the build phase and extract it
COPY --from=builder /app/joylive-package/target/*.zip /joylive/
RUN unzip /joylive/*.zip -d /joylive/ \
&& rm /joylive/*.zip
# Set up a working directory
WORKDIR /joylive
RUN mkdir /joylive/log
RUN mkdir /joylive/output
VOLUME ["/joylive/log", "/joylive/config"]
CMD ["true"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/JD-opensource/joylive-agent.git
[email protected]:JD-opensource/joylive-agent.git
JD-opensource
joylive-agent
joylive-agent
main

搜索帮助