arthas/Dockerfile-No-Jdk

20 lines
675 B
Plaintext
Raw Normal View History

2024-09-14 22:15:57 +08:00
# Stage 1: Build
FROM openjdk:8-jdk-alpine AS builder
2024-11-13 17:00:36 +08:00
ARG ARTHAS_VERSION="4.0.3"
ARG MIRROR=false
2020-04-02 22:36:59 +08:00
ENV MAVEN_HOST=https://repo1.maven.org/maven2 \
MIRROR_MAVEN_HOST=https://maven.aliyun.com/repository/public
# if use mirror change to aliyun mirror site
2024-09-14 22:15:57 +08:00
RUN if [ "$MIRROR" = "true" ]; then MAVEN_HOST=${MIRROR_MAVEN_HOST} ; fi && \
# download & install arthas
wget -qO /tmp/arthas.zip "${MAVEN_HOST}/com/taobao/arthas/arthas-packaging/${ARTHAS_VERSION}/arthas-packaging-${ARTHAS_VERSION}-bin.zip" && \
mkdir -p /opt/arthas && \
unzip /tmp/arthas.zip -d /opt/arthas && \
rm /tmp/arthas.zip
2024-09-14 22:15:57 +08:00
# Stage 2: Final
FROM alpine
COPY --from=builder /opt/arthas /opt/arthas