Skip to content

Commit

Permalink
Merge pull request #7 from eguchi1611/feature/create-gnuplot-image
Browse files Browse the repository at this point in the history
gnuplotのイメージも作成する
  • Loading branch information
eguchi1611 committed Mar 2, 2024
2 parents afb40cd + a11146a commit 93b0a8a
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/pre-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ on:
push:
branches:
- "main"
paths:
- "src/**"
pull_request:
branches:
- "main"
paths:
- "src/**"
schedule:
- cron: "0 0 * * 0" # 毎週日曜 (UTC)

Expand All @@ -20,6 +16,9 @@ env:
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
scheme: [basic, with-gnuplot]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -42,4 +41,5 @@ jobs:
imageName: ${{ env.REGISTRY_IMAGE }}
push: ${{ github.event_name != 'pull_request' && 'always' || 'never' }}
platform: linux/amd64,linux/arm64
subFolder: ./src
subFolder: ./src/${{ matrix.scheme }}
imageTag: ${{ matrix.scheme }}${{ matrix.scheme == 'basic' && ',latest' }}
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 31 additions & 0 deletions src/with-gnuplot/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM buildpack-deps:bookworm-scm

ENV PATH=/usr/local/texlive/bin:$PATH

WORKDIR /texlive-install

COPY ./texlive.profile .

# texliveをインストール
RUN wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz \
&& tar -xf install-tl-unx.tar.gz --strip-components 1 \
&& ./install-tl -profile texlive.profile \
&& ln -sf /usr/local/texlive/*/bin/* /usr/local/texlive/bin

# latexmkのインストール
RUN tlmgr install latexmk

# GhostscriptとGnuplotをインストール
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends ghostscript gnuplot \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /usr/local/texlive/texmf-local/tex/latex/gnuplot

# gnuplot-lua-tikzをインストール
RUN gnuplot -e 'set term tikz createstyle' \
&& mktexlsr

WORKDIR /

RUN rm -rf /texlive-install
21 changes: 21 additions & 0 deletions src/with-gnuplot/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "TeX Live",
"build": {
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"username": "vscode"
},
"ghcr.io/devcontainers/features/git:1": {}
},
"customizations": {
"vscode": {
"extensions": ["James-Yu.latex-workshop"],
"settings": {
"latex-workshop.latex.recipe.default": "latexmk (latexmkrc)"
}
}
},
"remoteUser": "vscode"
}
15 changes: 15 additions & 0 deletions src/with-gnuplot/.devcontainer/texlive.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# https://tug.org/texlive/doc/install-tl.html#PROFILES
selected_scheme scheme-custom

collection-basic 1
collection-fontsrecommended 1
collection-langcjk 1
collection-langjapanese 1
collection-latex 1
collection-latexextra 1
collection-latexrecommended 1
collection-mathscience 1
collection-pictures 1

tlpdbopt_install_docfiles 0
tlpdbopt_install_srcfiles 0

0 comments on commit 93b0a8a

Please sign in to comment.