-
Notifications
You must be signed in to change notification settings - Fork 100
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
base: main
Are you sure you want to change the base?
feat: add dockerfile for docs ci #2966
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
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 |
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' |
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.
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 |
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.
is it the image is root image? if yes, we do not need this line.
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.
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 |
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.
can we just install it with os built-in pkg manager?
add dockerfile for docs ci