ci: run docker job in privileged container with socket mount
Some checks failed
CI/CD / lint (push) Successful in 41s
CI/CD / test (push) Successful in 55s
CI/CD / typecheck (push) Successful in 10m52s
CI/CD / build (push) Successful in 1m21s
CI/CD / docker (push) Failing after 21s
CI/CD / publish-rpm (push) Successful in 37s
CI/CD / deploy (push) Has been skipped
Some checks failed
CI/CD / lint (push) Successful in 41s
CI/CD / test (push) Successful in 55s
CI/CD / typecheck (push) Successful in 10m52s
CI/CD / build (push) Successful in 1m21s
CI/CD / docker (push) Failing after 21s
CI/CD / publish-rpm (push) Successful in 37s
CI/CD / deploy (push) Has been skipped
No build tool works in the default unprivileged runner container (no Docker socket, no procfs, no FUSE). Run the docker job privileged with the host Docker socket mounted, then use standard docker build/push. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -142,46 +142,43 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build]
|
needs: [build]
|
||||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||||
|
container:
|
||||||
|
options: --privileged -v /var/run/docker.sock:/var/run/docker.sock
|
||||||
env:
|
env:
|
||||||
REGISTRY: ${{ env.GITEA_REGISTRY }}
|
REGISTRY: ${{ env.GITEA_REGISTRY }}
|
||||||
OWNER: ${{ env.GITEA_OWNER }}
|
OWNER: ${{ env.GITEA_OWNER }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install buildah
|
- name: Login to Gitea container registry
|
||||||
run: sudo apt-get update && sudo apt-get install -y buildah
|
run: |
|
||||||
|
echo "${{ secrets.PACKAGES_TOKEN }}" | docker login \
|
||||||
|
--username ${{ env.OWNER }} --password-stdin \
|
||||||
|
${{ env.REGISTRY }}
|
||||||
|
|
||||||
- name: Build & push mcpd
|
- name: Build & push mcpd
|
||||||
run: |
|
run: |
|
||||||
buildah --storage-driver vfs --isolation chroot bud -t mcpd:latest -f deploy/Dockerfile.mcpd .
|
docker build -t ${{ env.REGISTRY }}/${{ env.OWNER }}/mcpd:latest \
|
||||||
buildah --storage-driver vfs push --tls-verify=false \
|
-f deploy/Dockerfile.mcpd .
|
||||||
--creds "${{ env.OWNER }}:${{ secrets.PACKAGES_TOKEN }}" \
|
docker push ${{ env.REGISTRY }}/${{ env.OWNER }}/mcpd:latest
|
||||||
mcpd:latest \
|
|
||||||
docker://${{ env.REGISTRY }}/${{ env.OWNER }}/mcpd:latest
|
|
||||||
|
|
||||||
- name: Build & push node-runner
|
- name: Build & push node-runner
|
||||||
run: |
|
run: |
|
||||||
buildah --storage-driver vfs --isolation chroot bud -t node-runner:latest -f deploy/Dockerfile.node-runner .
|
docker build -t ${{ env.REGISTRY }}/${{ env.OWNER }}/mcpctl-node-runner:latest \
|
||||||
buildah --storage-driver vfs push --tls-verify=false \
|
-f deploy/Dockerfile.node-runner .
|
||||||
--creds "${{ env.OWNER }}:${{ secrets.PACKAGES_TOKEN }}" \
|
docker push ${{ env.REGISTRY }}/${{ env.OWNER }}/mcpctl-node-runner:latest
|
||||||
node-runner:latest \
|
|
||||||
docker://${{ env.REGISTRY }}/${{ env.OWNER }}/mcpctl-node-runner:latest
|
|
||||||
|
|
||||||
- name: Build & push python-runner
|
- name: Build & push python-runner
|
||||||
run: |
|
run: |
|
||||||
buildah --storage-driver vfs --isolation chroot bud -t python-runner:latest -f deploy/Dockerfile.python-runner .
|
docker build -t ${{ env.REGISTRY }}/${{ env.OWNER }}/mcpctl-python-runner:latest \
|
||||||
buildah --storage-driver vfs push --tls-verify=false \
|
-f deploy/Dockerfile.python-runner .
|
||||||
--creds "${{ env.OWNER }}:${{ secrets.PACKAGES_TOKEN }}" \
|
docker push ${{ env.REGISTRY }}/${{ env.OWNER }}/mcpctl-python-runner:latest
|
||||||
python-runner:latest \
|
|
||||||
docker://${{ env.REGISTRY }}/${{ env.OWNER }}/mcpctl-python-runner:latest
|
|
||||||
|
|
||||||
- name: Build & push docmost-mcp
|
- name: Build & push docmost-mcp
|
||||||
run: |
|
run: |
|
||||||
buildah --storage-driver vfs --isolation chroot bud -t docmost-mcp:latest -f deploy/Dockerfile.docmost-mcp .
|
docker build -t ${{ env.REGISTRY }}/${{ env.OWNER }}/docmost-mcp:latest \
|
||||||
buildah --storage-driver vfs push --tls-verify=false \
|
-f deploy/Dockerfile.docmost-mcp .
|
||||||
--creds "${{ env.OWNER }}:${{ secrets.PACKAGES_TOKEN }}" \
|
docker push ${{ env.REGISTRY }}/${{ env.OWNER }}/docmost-mcp:latest
|
||||||
docmost-mcp:latest \
|
|
||||||
docker://${{ env.REGISTRY }}/${{ env.OWNER }}/docmost-mcp:latest
|
|
||||||
|
|
||||||
- name: Link packages to repository
|
- name: Link packages to repository
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user