-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f672ae8
commit ca2d062
Showing
1 changed file
with
8 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
FROM alpine | ||
# Stage 1: Build | ||
FROM openjdk:8-jdk-alpine AS builder | ||
|
||
ARG ARTHAS_VERSION="4.0.1" | ||
ARG MIRROR=false | ||
|
||
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 | ||
RUN if $MIRROR; then MAVEN_HOST=${MIRROR_MAVEN_HOST} ; fi && \ | ||
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 | ||
|
||
# Stage 2: Final | ||
FROM alpine | ||
|
||
COPY --from=builder /opt/arthas /opt/arthas |