fix: use podman --remote for builds via host socket
Building images inside an unprivileged container fails on remount. Use podman --remote with the runner-mounted podman socket to delegate builds to the host engine. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -32,17 +32,17 @@ jobs:
|
|||||||
needs: [test, secrets]
|
needs: [test, secrets]
|
||||||
runs-on: linux
|
runs-on: linux
|
||||||
container: quay.io/podman/stable
|
container: quay.io/podman/stable
|
||||||
|
env:
|
||||||
|
CONTAINER_HOST: unix:///var/run/docker.sock
|
||||||
steps:
|
steps:
|
||||||
- run: |
|
- run: dnf install -y git
|
||||||
dnf install -y git
|
|
||||||
printf '[storage]\ndriver = "vfs"\n' > /etc/containers/storage.conf
|
|
||||||
- run: |
|
- run: |
|
||||||
git clone --depth 1 \
|
git clone --depth 1 \
|
||||||
-c "http.extraHeader=Authorization: token ${{ github.token }}" \
|
-c "http.extraHeader=Authorization: token ${{ github.token }}" \
|
||||||
"${{ github.server_url }}/${{ github.repository }}.git" .
|
"${{ github.server_url }}/${{ github.repository }}.git" .
|
||||||
- run: echo "$HARBOR_PASS" | podman login -u "$HARBOR_USER" --password-stdin harbor.mymx.me
|
- run: echo "$HARBOR_PASS" | podman --remote login -u "$HARBOR_USER" --password-stdin harbor.mymx.me
|
||||||
env:
|
env:
|
||||||
HARBOR_USER: ${{ secrets.HARBOR_USER }}
|
HARBOR_USER: ${{ secrets.HARBOR_USER }}
|
||||||
HARBOR_PASS: ${{ secrets.HARBOR_PASS }}
|
HARBOR_PASS: ${{ secrets.HARBOR_PASS }}
|
||||||
- run: podman build -t harbor.mymx.me/s5p/s5p:latest -f Containerfile .
|
- run: podman --remote build -t harbor.mymx.me/s5p/s5p:latest -f Containerfile .
|
||||||
- run: podman push harbor.mymx.me/s5p/s5p:latest
|
- run: podman --remote push harbor.mymx.me/s5p/s5p:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user