Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile for dashboard with doc update #2970

Merged
merged 4 commits into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions sentinel-dashboard/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

6 changes: 6 additions & 0 deletions sentinel-dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)。