Buildah Rootless Test / test-build (push) Failing after 15s
another buildah test
32 lines
1.1 KiB
YAML
32 lines
1.1 KiB
YAML
name: Buildah Rootless Test
|
|
on: [push]
|
|
|
|
jobs:
|
|
test-build:
|
|
runs-on: ubuntu-latest
|
|
# HIER: Kein globaler Container-Block mehr!
|
|
|
|
steps:
|
|
# 1. Funktioniert jetzt wieder, da Node.js auf dem Runner-Host vorhanden ist
|
|
- name: Code auschecken
|
|
uses: actions/checkout@v3
|
|
|
|
# 2. Erstellt die Testdatei im Workspace
|
|
- name: Test-Dockerfile erstellen
|
|
run: |
|
|
echo "FROM alpine:latest" > Containerfile
|
|
echo "RUN echo 'Hello from rootless Buildah via Docker-Run!' > /hello.txt" >> Containerfile
|
|
echo "CMD cat /hello.txt" >> Containerfile
|
|
|
|
# 3. Führt Buildah in einer maßgeschneiderten Sandbox aus
|
|
- name: Image mit Buildah bauen
|
|
run: |
|
|
docker run --rm \
|
|
-v ${{ github.workspace }}:/workspace \
|
|
-w /workspace \
|
|
--security-opt seccomp=unconfined \
|
|
--security-opt label=disable \
|
|
quay.io/buildah/stable:latest \
|
|
buildah --storage-driver=vfs --isolation=chroot bud \
|
|
-t lokales-test-image:latest \
|
|
-f Containerfile . |