BuildKit-Container mit custom /etc/hosts

This commit is contained in:
Jan 2025-10-23 20:32:39 +02:00
parent 66a77babfe
commit 6ff113007e

View file

@ -17,8 +17,23 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Create BuildKit config with custom hosts
run: |
mkdir -p ~/.docker
cat > ~/.docker/buildkitd.toml <<EOF
[registry."git.avatic.de"]
http = false
[worker.oci]
max-parallelism = 4
EOF
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
buildkitd-flags: --allow-insecure-entitlement network.host
config: ~/.docker/buildkitd.toml
- name: Login to Gitea Container Registry - name: Login to Gitea Container Registry
run: | run: |
@ -29,8 +44,8 @@ jobs:
with: with:
context: . context: .
push: true push: true
network: host
allow: network.host
tags: | tags: |
git.avatic.de/${{ gitea.repository_owner }}/lcc:${{ gitea.sha }} git.avatic.de/${{ gitea.repository_owner }}/lcc:${{ gitea.sha }}
git.avatic.de/${{ gitea.repository_owner }}/lcc:latest git.avatic.de/${{ gitea.repository_owner }}/lcc:latest
cache-from: type=registry,ref=git.avatic.de/${{ gitea.repository_owner }}/lcc:buildcache
cache-to: type=registry,ref=git.avatic.de/${{ gitea.repository_owner }}/lcc:buildcache,mode=max