mirror of
https://github.com/alibaba/arthas.git
synced 2026-11-30 15:33:59 +00:00
Merge pull request #386 from anjia0532/patch-1
arthas version & mirror use --build-arg
This commit is contained in:
1 file changed
+18
-5
+18
-5
@@ -1,9 +1,22 @@
|
|||||||
FROM openjdk:8-jdk-alpine
|
FROM openjdk:8-jdk-alpine
|
||||||
|
|
||||||
# https://github.com/docker-library/openjdk/issues/76
|
ARG ARTHAS_VERSION="3.0.5"
|
||||||
RUN apk add --no-cache tini
|
ARG MIRROR=false
|
||||||
|
|
||||||
|
ENV MAVEN_HOST=https://repo1.maven.org/maven2 \
|
||||||
|
ALPINE_HOST=dl-cdn.alpinelinux.org \
|
||||||
|
MIRROR_MAVEN_HOST=http://maven.aliyun.com/repository/public \
|
||||||
|
MIRROR_ALPINE_HOST=mirrors.aliyun.com
|
||||||
|
|
||||||
|
# if use mirror change to aliyun mirror site
|
||||||
|
RUN if $MIRROR; then MAVEN_HOST=${MIRROR_MAVEN_HOST} ;ALPINE_HOST=${MIRROR_ALPINE_HOST} ; sed -i "s/dl-cdn.alpinelinux.org/${ALPINE_HOST}/g" /etc/apk/repositories ; fi && \
|
||||||
|
# https://github.com/docker-library/openjdk/issues/76
|
||||||
|
apk add --no-cache tini && \
|
||||||
|
# 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
|
||||||
|
|
||||||
# Tini is now available at /sbin/tini
|
# Tini is now available at /sbin/tini
|
||||||
ENTRYPOINT ["/sbin/tini", "--"]
|
ENTRYPOINT ["/sbin/tini", "--"]
|
||||||
|
|
||||||
RUN wget -qO- -O /tmp/arthas.zip https://repo1.maven.org/maven2/com/taobao/arthas/arthas-packaging/3.0.5/arthas-packaging-3.0.5-bin.zip && mkdir -p /opt/arthas && unzip /tmp/arthas.zip -d /opt/arthas && rm /tmp/arthas.zip
|
|
||||||
|
|
||||||
Reference in new issue
Block a user