23 lines
803 B
Docker
23 lines
803 B
Docker
FROM eclipse-temurin:8-jre
|
|
|
|
# 下载 Sentinel 1.8.6 官方 JAR
|
|
RUN apt-get update && \
|
|
apt-get install -y wget && \
|
|
wget -O /sentinel-dashboard.jar \
|
|
https://github.com/alibaba/Sentinel/releases/download/1.8.6/sentinel-dashboard-1.8.6.jar && \
|
|
apt-get remove -y wget && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# 设置时区
|
|
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone
|
|
|
|
# 创建启动脚本
|
|
RUN echo '#!/bin/sh\n\
|
|
exec java ${JAVA_OPTS} -Dserver.port=${SERVER_PORT:-8080} -Dcsp.sentinel.dashboard.server=${DASHBOARD_SERVER:-localhost:8080} -Dproject.name=${PROJECT_NAME:-sentinel-dashboard} -jar /sentinel-dashboard.jar\n\
|
|
' > /entrypoint.sh && chmod +x /entrypoint.sh
|
|
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|