From 91cfbcfed52a079190dd0c0bfb210099dce2dfd1 Mon Sep 17 00:00:00 2001 From: KoCoder Date: Thu, 16 Apr 2026 22:54:02 +0200 Subject: [PATCH] New: build Dockercontainer --- .gitea/workflows/build-docker-container.yml | 37 +++++++++++++++++++++ Dockerfile | 13 ++++++++ README.md | 1 + 3 files changed, 51 insertions(+) create mode 100644 .gitea/workflows/build-docker-container.yml create mode 100644 Dockerfile create mode 100644 README.md diff --git a/.gitea/workflows/build-docker-container.yml b/.gitea/workflows/build-docker-container.yml new file mode 100644 index 0000000..dca8d7b --- /dev/null +++ b/.gitea/workflows/build-docker-container.yml @@ -0,0 +1,37 @@ +name: Build and Push Docker Image + +on: + push: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + container: + image: quay.io/buildah/stable + options: --security-opt seccomp=unconfined --security-opt apparmor=unconfined --device /dev/fuse:rw --privileged + + env: + BUILDAH_ISOLATION: chroot + STORAGE_DRIVER: vfs + + steps: + - name: Install Node.js + run: dnf install -y nodejs git + + - uses: actions/checkout@v4 + with: + token: ${{ secrets.REGISTRY_PASSWORD }} + submodules: true + + - name: Login to Registry + run: buildah login -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_PASSWORD }} git.kocoder.xyz + + - name: Buildah Build + run: | + buildah build -t ${{ github.sha }} . + + - name: Push Docker Images + run: | + buildah push ${{ github.sha }} docker://git.kocoder.xyz/docker/ga-pandoc:${{ github.sha }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2e21614 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM ghcr.io/catthehacker/ubuntu:gh-20.04 + +USER root + +RUN apt-get update +RUN apt-get upgrade +RUN apt-get install pandoc nodejs texlive-full -y +RUN apt-get clean +RUN rm -rf /var/lib/apt/lists/* + +RUN npm install -g @mermaid-js/mermaid-cli + +USER gitea-action \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..ae75c8c --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# GA Pandoc \ No newline at end of file