Commit ea0b3d09 authored by Mahito TANNO's avatar Mahito TANNO
Browse files

Set up for Docker

parent fe4ef309
Pipeline #102049992 passed with stage
in 19 minutes and 10 seconds
docker-build:
image: docker:latest
stage: build
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
- docker push "$CI_REGISTRY_IMAGE"
only:
- dockerfile
FROM frolvlad/alpine-glibc:latest
LABEL maintainer="Mahito Tanno <pb94.mahito@gmail.com>"
ARG TL_VERSION="2019"
ARG TL_REPO="http://mirror.ctan.org/systems/texlive"
ENV TEXMFLOCAL="/usr/local/texlive/texmf-local" \
PATH="/usr/local/texlive/${TL_VERSION}/bin/x86_64-linux:$PATH"
WORKDIR /tmp/install-tl-unx
RUN apk update && apk add --no-cache \
perl fontconfig-dev freetype-dev make git && \
apk add --no-cache --virtual .build-tool gnupg wget tar unzip xz && \
# Install TeX Live
wget -qO - "${TL_REPO}/tlnet/install-tl-unx.tar.gz" | \
tar xz -C /tmp/install-tl-unx --strip-components 1 && \
echo -e "selected_scheme scheme-basic\n\
tlpdbopt_autobackup 0\n\
tlpdbopt_install_docfiles 0\n\
tlpdbopt_install_srcfiles 0" > texlive.profile && \
./install-tl -profile ./texlive.profile -repository "${TL_REPO}/tlnet/" && \
tlmgr install \
collection-latexextra \
collection-fontsrecommended collection-fontsextra \
collection-bibtexextra \
collection-luatex \
collection-langjapanese \
latexmk && \
# Install Source Han Serif/Sans font
wget -q https://github.com/adobe-fonts/source-han-serif/raw/release/OTF/SourceHanSerifJ_EL-M.zip && \
wget -q https://github.com/adobe-fonts/source-han-serif/raw/release/OTF/SourceHanSerifJ_SB-H.zip && \
wget -q https://github.com/adobe-fonts/source-han-sans/raw/release/OTF/SourceHanSansJ.zip && \
mkdir -p /usr/share/fonts && \
unzip -j 'SourceHanSerif*.zip' "*.otf" -d /usr/share/fonts && \
unzip -j 'SourceHanSansJ.zip' "*.otf" -d /usr/share/fonts && \
mkdir -p "${TEXMFLOCAL}/fonts/opentype/adobe/sourcehanserif" && \
mkdir -p "${TEXMFLOCAL}/fonts/opentype/adobe/sourcehansans" && \
ln -s /usr/share/fonts/SourceHanSerif* "${TEXMFLOCAL}/fonts/opentype/adobe/sourcehanserif/" && \
ln -s /usr/share/fonts/SourceHanSans* "${TEXMFLOCAL}/fonts/opentype/adobe/sourcehansans/" && \
fc-cache -fv && luaotfload-tool --update --force && mktexlsr && \
# Clean up
rm -rf /tmp/* && \
apk del --purge .build-tool
WORKDIR /work
CMD ["/bin/sh"]
# tex-latex-advent-2019
# registry.gitlab.com/mahito1594/sample-latex-project
TeX & LaTeX advent calendar 2019 のサンプルリポジトリ: https://presche.me/posts/2019/12/tex-latex-advent-calendar/
\ No newline at end of file
LuaLaTeX + Source Han Serif/Sans で PDF を作成できる Docker イメージです.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment