-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[docker] add reporting fonts #74806
[docker] add reporting fonts #74806
Conversation
We have a troubleshooting guide for reporting here: https://www.elastic.co/guide/en/kibana/current/reporting-troubleshooting.html#reporting-troubleshooting-system-dependencies Should these dependencies be updated? I think we should settle on a set of dependencies we recommend in the docs and use in the container. @elastic/kibana-reporting-services |
@elasticmachine merge upstream |
Pinging @elastic/kibana-operations (Team:Operations) |
Right now the Reporting docs for setup requirements have a list of font packages that are locale-specific. Those were added incrementally in response to various issues. If Let's update the docs to remove the mention of specific locale fonts. For international text requirements, we must guide people to install Noto. That aligns the manual setup with the Docker setup. |
@jbudz, apologies for the conflict - but when you rebase it will now be in a retry loop to handle some network issues for that request. The ~20M is not ideal here, but Chinese is a locale we directly support and we have a shortlist that needs specific fonts. In the future, we could revisit to see if this can be fetched at runtime mounted or something else. Do we need to also provide the JA font? |
|
||
RUN cd /usr/local/share/fonts/ \ | ||
&& curl-L -o "https://github.com/googlefonts/noto-cjk/raw/NotoSansV2.001/NotoSansCJK-Regular.ttc" \ | ||
&& fc-cache -f -v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is missing a \
for the newline here.
It'll support Chinese, Japanese and Korean. I'm going to see if this works with Red Hat's package repositories (the changes above), it is available under this name on CentOS. It looks like it may already be included but in the meantime trying to find a way to search without an active subscription. I'll spin up the docker image from this. This is under a different name in the debian repository that I had alluded to before, but if we're not using that as a base I'm okay with it. |
Random future idea, maybe we do something like linuxserver Docker Mods for additional fonts, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting a build failure:
info [ kibana ] Creating docker package
│ info $ ./build_docker.sh
│ info 8: Pulling from library/centos
│ info Digest: sha256:76d24f3ba3317fa945743bb3746fbaf3a0b752f10b10376960de01da70685fbd
│ info Status: Image is up to date for centos:8
│ info docker.io/library/centos:8
│ info Building: kibana-docker
│ info Sending build context to Docker daemon 220.6MB
│ info Step 1/28 : FROM centos:8 AS builder
│ info ---> 0d120b6ccaa8
│ info Step 2/28 : COPY kibana-8.0.0-SNAPSHOT-linux-x86_64.tar.gz /opt
│ info ---> 12139965f527
│ info Step 3/28 : RUN mkdir /usr/share/kibana
│ info ---> Running in 89f47a6b01c3
│ info Removing intermediate container 89f47a6b01c3
│ info ---> 4e1a2405c998
│ info Step 4/28 : WORKDIR /usr/share/kibana
│ info ---> Running in 6ecdb0d6c51a
│ info Removing intermediate container 6ecdb0d6c51a
│ info ---> 9eff24b66638
│ info Step 5/28 : RUN tar --strip-components=1 -zxf /opt/kibana-8.0.0-SNAPSHOT-linux-x86_64.tar.gz
│ info ---> Running in fcd5d2afff26
│ info Removing intermediate container fcd5d2afff26
│ info ---> b35273eafdcd
│ info Step 6/28 : RUN chmod -R g=u /usr/share/kibana
│ info ---> Running in 20e3b5d77ca6
│ info Removing intermediate container 20e3b5d77ca6
│ info ---> 6892cab36ef9
│ info Step 7/28 : RUN find /usr/share/kibana -type d -exec chmod g+s {} \;
│ info ---> Running in 0c297870781b
│ info Removing intermediate container 0c297870781b
│ info ---> 965970a6dbbb
│ info Step 8/28 : FROM centos:8
│ info ---> 0d120b6ccaa8
│ info Step 9/28 : EXPOSE 5601
│ info ---> Using cache
│ info ---> ff279d0ea65f
│ info Step 10/28 : RUN for iter in {1..10}; do yum update --setopt=tsflags=nodocs -y && yum install --setopt=tsflags=nodocs -y fontconfig freetype shadow-utils libnss3.so && yum clean all && exit_code=0 && break || exit_code=$? && echo "yum error: retry $iter in 10s" && sleep 10; done; (exit $exit_code)
│ info ---> Using cache
│ info ---> af3889acedf2
│ info Step 11/28 : RUN curl -L -o /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64
│ info ---> Using cache
│ info ---> 7bc0a16d8ea7
│ info Step 12/28 : RUN echo "37f2c1f0372a45554f1b89924fbb134fc24c3756efaedf11e07f599494e0eff9 /usr/local/bin/dumb-init" | sha256sum -c -
│ info ---> Using cache
│ info ---> 60f75ac423f8
│ info Step 13/28 : RUN chmod +x /usr/local/bin/dumb-init
│ info ---> Using cache
│ info ---> 6ee6147ff744
│ info Step 14/28 : RUN cd /usr/local/share/fonts/ && curl-L -o "https://github.com/googlefonts/noto-cjk/raw/NotoSansV2.001/NotoSansCJK-Regular.ttc" && fc-cache -f -v && cd -
│ info ---> Running in df1dd9436541
│ info /bin/sh: line 0: cd: /usr/local/share/fonts/: No such file or directory
│ info The command '/bin/sh -c cd /usr/local/share/fonts/ && curl-L -o "https://github.com/googlefonts/noto-cjk/raw/NotoSansV2.001/NotoSansCJK-Regular.ttc" && fc-cache -f -v && cd -' returned a non-zero code: 1
│ info
│ERROR failure 4 min 59 sec
I'm running a build while I take a look for at the reporting docs. I went through the commands manually with a docker run on centos, need to verify ubi in particular |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
live notes while i test
https://s3-us-west-1.amazonaws.com/temp.jbudz.me/kibana-8.0.0-SNAPSHOT-docker-image.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Remember to add a release note |
Co-authored-by: Elastic Machine <[email protected]>
7.x: 0c3a4ff |
* master: (85 commits) Refactor attribute service (elastic#78414) [APM] Add default message to alerts. (elastic#78930) [Discover] Modify columns and sort when switching index pattern (elastic#74336) Document ts project references setup (elastic#78586) build all ts refs in single kbn:bootstrap (elastic#79438) [TSVB] Allow string fields on value count aggregation (elastic#79267) [SECURITY SOLUTION] Investigate EQL signal in timeline (elastic#79049) [Fleet] Add loading spinner to page headers (elastic#79568) [Security Solution][Resolver] Resolver query panel load more (elastic#79160) Add type row to monitor detail page. (elastic#79556) Remove license refresh from setup (elastic#79518) [docker] add reporting fonts (elastic#74806) [SECURITY_SOLUTION][ENDPOINT] Add info about trusted apps to the page subtitle + create flyout (elastic#79558) Trim Hash value before validating it (elastic#79545) Warn users when security is not configured (elastic#78545) update copy styling (elastic#79313) Update dependency @elastic/charts to v23.1.1 (elastic#78459) Introduce geo-threshold alerts (elastic#76285) elastic#76920 Show base breadcrumb when there is an error booting the app (elastic#79571) remove react-intl from kibana and keep it inside only i18n package (elastic#78956) ...
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
Friendly reminder: Looks like this PR hasn’t been backported yet. |
hi team, previously we had this in manual, but now it seems we don't say those fonts explicitly: I read this is because of this comment: #74806 (comment) But one thing is not super clear to me, so please allow me to double check: 🙏
Is it true that the Noto-CJK (this PR) is one package that supports all the locales?
|
This bakes the Noto-CJK font into our docker builds. License notice wise we already have this added from the reporting folder, but it's a bit of a hack to rely on that, but I also don't want to duplicate it. Not sure.
EUI uses "Inter" by default but there isn't a CJK package, so I went with the status quo. Open to changing it, open to adding more fonts. The curl as opposed to apt-get portion is intentional - there's a limited selection on package repositories, and there's slight naming differences in centos and ubuntu.
Doing the usual draft for docker builds -> test -> revert --all-platforms -> add review label (and reporting team once this is squared away)
Closes #70889
https://www.google.com/get/noto/ for the list - everything by the looks of it. It's 1.1gb.
Release note:
Docker images now include CJK fonts built in.