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

feat: add dockerfile for docs ci #2966

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

purelind
Copy link
Collaborator

add dockerfile for docs ci

Copy link

ti-chi-bot bot commented May 16, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link

ti-chi-bot bot commented May 16, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign wuhuizuo for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot requested a review from wuhuizuo May 16, 2024 09:47
@ti-chi-bot ti-chi-bot bot added the size/M label May 16, 2024
@purelind
Copy link
Collaborator Author

purelind commented May 21, 2024

When using the new image built with this new dockerfile for PDF generation, the following errors may occur.

scripts/generate_pdf.sh

[pandoc warning] Could not find image `/media/ticdc/ticdc-architecture-3.PNG', skipping...
! Missing number, treated as zero.
<to be read again>
                   \protect
l.214982 ...r}\rule{0.5\linewidth}{\linethickness}

pandoc: Error producing PDF

related to this script https://github.com/pingcap/docs/blob/master/scripts/generate_pdf.sh

@purelind
Copy link
Collaborator Author

LaTeX Warning: No \author given.


! LaTeX Error: Unicode character ɪ (U+026A)
               not set up for use with LaTeX.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.120 ...://github.com/pingcap/tidb}{TiDB} (/'taɪ
                                                  diːbi:/, ``Ti''

USER [circleci]
CMD ["/bin/sh"]

RUN mkdir -p /tmp/prepare && cd /tmp/prepare && curl -L https://github.com/jgm/pandoc/releases/download/1.19.2/pandoc-1.19.2-1-amd64.deb -o pandoc.deb && sudo dpkg -i pandoc.deb && sudo apt-get -y install texlive-xetex texlive-latex-extra texlive-lang-cjk etoolbox && sudo apt-get -y install ttf-wqy-microhei && sudo pip3 install qiniu && sudo rm -rf /tmp/prepare && sudo rm -rf /var/lib/apt/lists/* && sudo bash -c 'echo "119.188.128.5 uc.qbox.me" >> /etc/hosts'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we need to hard code the host record?

CMD ["/bin/sh"]

RUN mkdir -p /tmp/prepare && cd /tmp/prepare && curl -L https://github.com/jgm/pandoc/releases/download/1.19.2/pandoc-1.19.2-1-amd64.deb -o pandoc.deb && sudo dpkg -i pandoc.deb && sudo apt-get -y install texlive-xetex texlive-latex-extra texlive-lang-cjk etoolbox && sudo apt-get -y install ttf-wqy-microhei && sudo pip3 install qiniu && sudo rm -rf /tmp/prepare && sudo rm -rf /var/lib/apt/lists/* && sudo bash -c 'echo "119.188.128.5 uc.qbox.me" >> /etc/hosts'
USER root
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it the image is root image? if yes, we do not need this line.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and we'd better control the running user in docker run options or pod options rather than the dockerfile.

RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
RUN locale-gen C.UTF-8 || true
ENV LANG=C.UTF-8
RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL && chmod +x /usr/bin/jq && jq --version
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just install it with os built-in pkg manager?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants