.gitea/workflows/buildah_test.yml aktualisiert
Buildah Rootless Test / test-build (push) Failing after 4s
Buildah Rootless Test / test-build (push) Failing after 4s
next try
This commit is contained in:
@@ -4,29 +4,19 @@ 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
|
||||
- name: Image mit Buildah über Stdin bauen
|
||||
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 \
|
||||
# Wir übergeben das Containerfile direkt als Here-Doc (<<-EOF) an den Container
|
||||
docker run -i --rm \
|
||||
--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 .
|
||||
-f - . <<-EOF
|
||||
FROM alpine:latest
|
||||
RUN echo 'Hello from rootless Buildah via Stdin!' > /hello.txt
|
||||
CMD cat /hello.txt
|
||||
EOF
|
||||
Reference in New Issue
Block a user