1 Star 0 Fork 66

一份耕耘一份收获/kafka-map

forked from dushixiang/kafka-map 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
dushixiang 提交于 2023-01-21 10:16 . - 移除旧版前端页面
#
# Build stage
#
FROM node:16 AS front-build
WORKDIR /app
COPY web .
RUN yarn && yarn build
FROM maven:3.8.7-amazoncorretto-17 AS build
WORKDIR /app
COPY src src
COPY pom.xml pom.xml
COPY LICENSE LICENSE
COPY --from=front-build /app/dist src/main/resources/static
RUN mvn -f pom.xml clean package -Dmaven.test.skip=true
# base image to build a JRE
FROM amazoncorretto:17.0.6-alpine as corretto-jdk
# required for strip-debug to work
RUN apk add --no-cache binutils
# Build small JRE image
RUN $JAVA_HOME/bin/jlink \
--verbose \
--add-modules ALL-MODULE-PATH \
--strip-debug \
--no-man-pages \
--no-header-files \
--compress=2 \
--output /customjre
#
# Package stage
#
FROM alpine:latest
ENV JAVA_HOME=/jre
ENV PATH="${JAVA_HOME}/bin:${PATH}"
# copy JRE from the base image
COPY --from=corretto-jdk /customjre $JAVA_HOME
ENV SERVER_PORT 8080
ENV DEFAULT_USERNAME admin
ENV DEFAULT_PASSWORD admin
WORKDIR /usr/local/kafka-map
COPY --from=build /app/target/*.jar kafka-map.jar
COPY --from=build /app/LICENSE LICENSE
EXPOSE $SERVER_PORT
ENTRYPOINT ["/jre/bin/java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/usr/local/kafka-map/kafka-map.jar", "--server.port=${SERVER_PORT}", "--default.username=${DEFAULT_USERNAME}", "--default.password=${DEFAULT_PASSWORD}"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/myempgit/kafka-map.git
git@gitee.com:myempgit/kafka-map.git
myempgit
kafka-map
kafka-map
master

搜索帮助