diff --git a/sentinel-dashboard/Dockerfile b/sentinel-dashboard/Dockerfile new file mode 100644 index 0000000000..3a3412db23 --- /dev/null +++ b/sentinel-dashboard/Dockerfile @@ -0,0 +1,20 @@ +FROM amd64/buildpack-deps:buster-curl as installer + +ARG SENTINEL_VERSION=1.8.6 + +RUN set -x \ + && curl -SL --output /home/sentinel-dashboard.jar https://github.com/alibaba/Sentinel/releases/download/${SENTINEL_VERSION}/sentinel-dashboard-${SENTINEL_VERSION}.jar + +FROM openjdk:8-jre-slim + +# copy sentinel jar +COPY --from=installer ["/home/sentinel-dashboard.jar", "/home/sentinel-dashboard.jar"] + +ENV JAVA_OPTS '-Dserver.port=8080 -Dcsp.sentinel.dashboard.server=localhost:8080' + +RUN chmod -R +x /home/sentinel-dashboard.jar + +EXPOSE 8080 + +CMD java ${JAVA_OPTS} -jar /home/sentinel-dashboard.jar + diff --git a/sentinel-dashboard/README.md b/sentinel-dashboard/README.md index ad8b91f966..e3597725df 100755 --- a/sentinel-dashboard/README.md +++ b/sentinel-dashboard/README.md @@ -58,4 +58,10 @@ java -Dserver.port=8080 \ 客户端正确配置并启动后,会**在初次调用后**主动向控制台发送心跳包,汇报自己的存在; 控制台收到客户端心跳包之后,会在左侧导航栏中显示该客户端信息。如果控制台能够看到客户端的机器信息,则表明客户端接入成功了。 +## 6. 构建Docker镜像 + +``` +docker build --build-arg SENTINEL_VERSION=1.8.6 -t ${REGISTRY}/sentinel-dashboard:v1.8.6 . +``` + 更多:[控制台功能介绍](./Sentinel_Dashboard_Feature.md)。 \ No newline at end of file