网站首页 > 知识剖析 正文
以下蓝色文字均有链接 但由于头条对于外部链接管理较严 故未添加链接 如影响阅读 请看原文
原文地址 https://fizzz.blog.csdn.net/article/details/108120518
使用Docker构建rancher ui镜像必须准备好
- 要部署的服务器ip或域名
- 部署的端口
- https证书
以部署到 192.168.99.100:8000 为例
./scripts/build-static -l -s -v 'rancher-ui' -c '192.168.99.100:8000' # 编译前端项目
docker build -t rancher-ui:latest . # 构建镜像
docker stop ou && docker container rm ou # 停止旧容器并移除
docker run -d -p 8000:8000 --name ou rancher-ui:latest # 运行新的rancher-ui镜像
Dockerfile
FROM nginx:latest
COPY ssl /rancher-ui/ssl
COPY rancher-ui.conf /etc/nginx/conf.d
COPY /dist/static /rancher-ui/www
rancher-ui.conf文件
server {
listen 8000 ssl;
server_name 127.0.0.1;
ssl_certificate /rancher-ui/ssl/server.crt;
ssl_certificate_key /rancher-ui/ssl/server.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
add_header Access-Control-Allow-Origin *;
location / {
alias /rancher-ui/www/;
index index.html index.htm;
}
}
run之后 访问链接https://192.168.99.100:8000/rancher-ui/
看到
出现此页面表明一切正常。
后在rancher中访问 /v3/settings/ui-index 如 我的rancher部署在192.168.59.129
https://192.168.59.129/v3/settings/ui-index
需登录后访问
将https://192.168.99.100:8000/rancher-ui/ 填充value中,并保存上传。 再重新刷新rancher的页面,就是新的自定义UI页面。
- 上一篇: 你应该知道的前端小知识,初学者,确定不点进来看看吗?
- 下一篇: 什么是跨域?跨域解决方法
猜你喜欢
- 2024-11-24 浏览器跨域问题以及常用解决方案
- 2024-11-24 14个前端小知识,我猜你每天都会遇到
- 2024-11-24 跨域问题的4种解决方案
- 2024-11-24 什么是跨域?跨域解决方法
- 2024-11-24 你应该知道的前端小知识,初学者,确定不点进来看看吗?
- 2024-11-24 15个前端小知识
- 2024-11-24 记一场纯JS赛——DiceCTF2021 Web题解
- 2024-11-24 如何基于 Elasticsearch 实现排序沉底或前置
- 2024-11-24 如何查找网站源IP地址
- 2024-11-24 SQL优化-数据库自优化
- 最近发表
- 标签列表
-
- xml (46)
- css animation (57)
- array_slice (60)
- htmlspecialchars (54)
- position: absolute (54)
- datediff函数 (47)
- array_pop (49)
- jsmap (52)
- toggleclass (43)
- console.time (63)
- .sql (41)
- ahref (40)
- js json.parse (59)
- html复选框 (60)
- css 透明 (44)
- css 颜色 (47)
- php replace (41)
- css nth-child (48)
- min-height (40)
- xml schema (44)
- css 最后一个元素 (46)
- location.origin (44)
- table border (49)
- html tr (40)
- video controls (49)