Skip to content

Commit

Permalink
Feat: added docker support
Browse files Browse the repository at this point in the history
  • Loading branch information
HuangFuSL committed Aug 21, 2023
1 parent 19a82a6 commit 8a8bbc2
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build docker image

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout main
uses: actions/checkout@v2
- name: Docker login
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup buildx
uses: docker/setup-buildx-action@v1
- name: Build docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/huangfusl/template:${{ github.ref_name }}
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM texlive/texlive:latest

# Install fonts
RUN sed -i 's/testing/stable/g' /etc/apt/sources.list \
&& echo "deb http://deb.debian.org/debian stable contrib" >> /etc/apt/sources.list \
&& apt update \
&& apt install ttf-mscorefonts-installer fonts-noto-cjk -y \
&& apt clean

COPY . /template
ENV TEXINPUTS=/template//:

VOLUME [ "/data" ]
WORKDIR /data

0 comments on commit 8a8bbc2

Please sign in to comment.