diff --git a/Dockerfile b/Dockerfile index 2304ef5..3bdb372 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,35 +1,7 @@ -FROM debian:bookworm-slim +FROM ghcr.io/parpalak/upmath-texlive-docker:2023.0 EXPOSE 80 -WORKDIR / - -COPY "docker/texlive.profile" /texlive.profile - -# See also https://github.com/reitzig/texlive-docker -RUN apt-get update && \ - apt-get install -qy --no-install-recommends \ - wget ca-certificates perl \ - ghostscript \ - && wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz \ - && tar -xzf install-tl-unx.tar.gz \ - && rm install-tl-unx.tar.gz \ - && mv install-tl-* install-tl \ - && tlversion=$(cat install-tl/release-texlive.txt | head -n 1 | awk '{ print $5 }') \ - && mkdir -p /usr/local/texlive/${tlversion}/bin \ - && ( cd install-tl \ - && tlversion=$(cat release-texlive.txt | head -n 1 | awk '{ print $5 }') \ - && sed -i "s/\${tlversion}/${tlversion}/g" /texlive.profile \ - && ./install-tl -profile /texlive.profile \ - ) \ - && rm -rf install-tl \ - && tlmgr version | tail -n 1 > version \ - && echo "Installed on $(date)" >> version \ - && apt-get remove -y wget ca-certificates perl \ - && apt-get autoremove -y \ - && rm -rf /var/lib/apt/lists/* \ - && rm -rf /var/cache/apt/ - WORKDIR /var/www/i.upmath.me RUN apt-get update && apt-get -y install \ @@ -53,16 +25,17 @@ RUN apt-get update && apt-get -y install \ rm -rf /var/lib/apt/lists/* && \ rm -rf /var/cache/apt/ -RUN npm install -g yarn && \ - npm install -g bower && \ - npm install -g grunt-cli - COPY . . + RUN mkdir -p logs RUN composer install --no-dev -RUN yarn install -RUN bower install -RUN grunt + +RUN npm install -g bower yarn grunt-cli && \ + yarn install && \ + bower install && \ + grunt && \ + yarn install --prod && \ + npm uninstall -g bower yarn grunt-cli RUN mkdir -p /var/run/php-fpm/ diff --git a/docker/texlive.profile b/docker/texlive.profile deleted file mode 100644 index b01dab0..0000000 --- a/docker/texlive.profile +++ /dev/null @@ -1,65 +0,0 @@ -selected_scheme scheme-custom -TEXDIR /usr/local/texlive/${tlversion} -TEXMFCONFIG ~/.texlive${tlversion}/texmf-config -TEXMFHOME ~/texmf -TEXMFLOCAL /usr/local/texlive/texmf-local -TEXMFSYSCONFIG /usr/local/texlive/${tlversion}/texmf-config -TEXMFSYSVAR /usr/local/texlive/${tlversion}/texmf-var -TEXMFVAR ~/.texlive${tlversion}/texmf-var -binary_x86_64-linux 1 -collection-basic 1 -collection-bibtexextra 1 -collection-binextra 1 -collection-context 1 -collection-fontsrecommended 1 -collection-fontutils 1 -collection-formatsextra 1 -collection-games 1 -collection-humanities 1 -collection-langarabic 1 -collection-langchinese 1 -collection-langcjk 1 -collection-langcyrillic 1 -collection-langczechslovak 1 -collection-langenglish 1 -collection-langeuropean 1 -collection-langfrench 1 -collection-langgerman 1 -collection-langgreek 1 -collection-langitalian 1 -collection-langjapanese 1 -collection-langkorean 1 -collection-langother 1 -collection-langpolish 1 -collection-langportuguese 1 -collection-langspanish 1 -collection-latex 1 -collection-latexextra 1 -collection-latexrecommended 1 -collection-luatex 1 -collection-mathscience 1 -collection-metapost 1 -collection-music 1 -collection-pictures 1 -collection-plaingeneric 1 -collection-pstricks 1 -collection-publishers 1 -collection-xetex 1 -instopt_adjustpath 0 -instopt_adjustrepo 1 -instopt_letter 0 -instopt_portable 0 -instopt_write18_restricted 1 -tlpdbopt_autobackup 1 -tlpdbopt_backupdir tlpkg/backups -tlpdbopt_create_formats 1 -tlpdbopt_desktop_integration 1 -tlpdbopt_file_assocs 1 -tlpdbopt_generate_updmap 0 -tlpdbopt_install_docfiles 0 -tlpdbopt_install_srcfiles 0 -tlpdbopt_post_code 1 -tlpdbopt_sys_bin /usr/local/bin -tlpdbopt_sys_info /usr/local/share/info -tlpdbopt_sys_man /usr/local/share/man -tlpdbopt_w32_multi_user 1