New: build Dockercontainer
Some checks failed
Build and Push Docker Image / build (push) Failing after 2m17s
Some checks failed
Build and Push Docker Image / build (push) Failing after 2m17s
This commit is contained in:
37
.gitea/workflows/build-docker-container.yml
Normal file
37
.gitea/workflows/build-docker-container.yml
Normal file
@@ -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 }}
|
||||||
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user