datahub 修改logo及网站名
建议首先将docker关闭,再开启datahub,然后再进行jar包的修改!
第一步:列出docker
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
790c0cee9cea confluentinc/cp-schema-registry:5.4.0 "/etc/confluent/do..." 2 days ago Up 2 days 0.0.0.0:8081->8081/tcp schema-registry
83ec556ac135 acryldata/datahub-actions:head "/bin/sh -c 'docke..." 2 days ago Up 2 days datahub_datahub-actions_1
f7f1446e7400 linkedin/datahub-frontend-react:head "datahub-frontend/..." 2 days ago Up 2 days (healthy) 0.0.0.0:9002->9002/tcp datahub-frontend-react
57b3ee5bf99c confluentinc/cp-kafka:5.4.0 "/etc/confluent/do..." 2 days ago Up 2 days 0.0.0.0:9092->9092/tcp, 0.0.0.0:29092->29092/tcp broker
fe4f10b335bd linkedin/datahub-gms:head "/bin/sh -c /datah..." 2 days ago Up 2 days (healthy) 0.0.0.0:8080->8080/tcp datahub-gms
7addb46ce0b2 confluentinc/cp-zookeeper:5.4.0 "/etc/confluent/do..." 2 days ago Up 2 days 2888/tcp, 0.0.0.0:2181->2181/tcp, 3888/tcp zookeeper
5a2bc6ce3591 elasticsearch:7.9.3 "/tini -- /usr/loc..." 2 days ago Up 2 days (healthy) 0.0.0.0:9200->9200/tcp, 9300/tcp elasticsearch
d68c7c811892 mysql:5.7
第二步: 进入linkedin/datahub-frontend-react:head查看文件
docker exec -it 3b2adca1a8d6 /bin/sh
ls /datahub-frontend/lib/data*.*
/datahub-frontend/lib/datahub-frontend-assets.jar /datahub-frontend/lib/datahub-frontend.jar
第三步:将/datahub-frontend-assets.jar拷贝至其他目录
docker cp f7f1446e7400:/datahub-frontend/lib/datahub-frontend-assets.jar /app
第四步:检查jar文件
jar tf datahub-frontend-assets.jar
public/favicon.ico
public/logo.png
public/robots.txt
public/index.html
public/manifest.json
public/asset-manifest.json
查看是否包含以上文件
第五步:准备要替换的图标并拷贝至准备的文件夹
略
第六步:解压jar,并修改
修改index.html的title标签
jar -xf datahub-frontend-assets.jar public/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="A Metadata Platform for the Modern Data Stack" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>DataHub</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root" style="min-height: 100%; display: flex; flex-direction: column"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
--></body>
</html>
第七步:替换jar内容
替换登录页面的log.png ,替换搜索页面的datahublogo.png
jar uf datahub-frontend-assets.jar public/logo.png
jar uf datahub-frontend-assets.jar public/index.html
jar uf datahub-frontend-assets.jar public/favicon.ico
jar uf datahub-frontend-assets.jar public/platforms/datahublogo.png
第八步:替换jar
docker cp datahub-frontend-assets.jar 3b2adca1a8d6:/datahub-frontend/lib/
第九步:重启这个容器
关闭全部容器
docker stop 1}' | tail -n +2)
单独关闭启动对应容器
docker stop 3b2adca1a8d6
docker start 3b2adca1a8d6