1 Star 0 Fork 11

小齐同学/BifroMQ

forked from Gitee 极速下载/BifroMQ 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
ARG BASE_IMAGE=centos:7
FROM --platform=$TARGETPLATFORM ${BASE_IMAGE} AS builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
# download openjdk
RUN if [[ "$TARGETPLATFORM" == *amd* ]]; then \
export JDK_ARCH=x64; \
else \
export JDK_ARCH=aarch64; \
fi \
&& curl --retry 5 -S -L -O https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-${JDK_ARCH}_bin.tar.gz \
&& tar -zxvf openjdk-17.0.2_linux-${JDK_ARCH}_bin.tar.gz \
&& rm -rf openjdk-17.0.2_linux-${JDK_ARCH}_bin.tar.gz
FROM --platform=$TARGETPLATFORM ${BASE_IMAGE}
RUN groupadd -r -g 1000 bifromq \
&& useradd -r -m -u 1000 -g bifromq bifromq \
&& mkdir /usr/share/bifromq
COPY --chown=bifromq:bifromq --from=builder /jdk-17.0.2 /usr/share/bifromq/jdk-17.0.2
COPY --chown=bifromq:bifromq bifromq-*-standalone.tar.gz /usr/share/bifromq/
RUN tar -zxvf /usr/share/bifromq/bifromq-*-standalone.tar.gz --strip-components 1 -C /usr/share/bifromq \
&& rm -rf /usr/share/bifromq/bifromq-*-standalone.tar.gz \
&& chown -R bifromq:bifromq /usr/share/bifromq
ENV JAVA_HOME /usr/share/bifromq/jdk-17.0.2
ENV PATH /usr/share/bifromq/jdk-17.0.2/bin:$PATH
WORKDIR /usr/share/bifromq
USER bifromq
EXPOSE 1883 1884 80 443
CMD ["./bin/standalone.sh", "start", "-fg"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/leqixiaozi/BifroMQ.git
git@gitee.com:leqixiaozi/BifroMQ.git
leqixiaozi
BifroMQ
BifroMQ
main

搜索帮助