Stop forcing DOCKER_HOST to tcp://docker.local:2375

Job containers already mount the host Docker socket and default to
unix:///var/run/docker.sock. The TCP override is unreachable from the
bridge network and breaks docker login/build in Gitea Actions.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
proxmox
2026-08-02 21:36:05 -07:00
parent ec2a398894
commit c1ca2b41c0
2 changed files with 6 additions and 5 deletions
+5 -4
View File
@@ -1,5 +1,5 @@
name: Docker Build + Push name: Docker Build + Push
description: Build and push Docker images for Gitea Actions using the docker daemon at DOCKER_HOST description: Build and push Docker images for Gitea Actions via the job-mounted Docker socket
author: eric author: eric
inputs: inputs:
@@ -44,9 +44,6 @@ outputs:
runs: runs:
using: composite using: composite
env:
DOCKER_HOST: tcp://docker.local:2375
DOCKER_BUILDKIT: "1"
steps: steps:
- name: Compute metadata - name: Compute metadata
@@ -77,6 +74,8 @@ runs:
- name: Log in to Docker registry - name: Log in to Docker registry
shell: bash shell: bash
env:
DOCKER_BUILDKIT: "1"
run: | run: |
if [ -n "${{ inputs.registry }}" ] && [ -n "${{ inputs.registry-password }}" ]; then if [ -n "${{ inputs.registry }}" ] && [ -n "${{ inputs.registry-password }}" ]; then
echo "${{ inputs.registry-password }}" | docker login ${{ inputs.registry }} -u ${{ inputs.registry-username }} --password-stdin echo "${{ inputs.registry-password }}" | docker login ${{ inputs.registry }} -u ${{ inputs.registry-username }} --password-stdin
@@ -85,6 +84,8 @@ runs:
- name: Build image - name: Build image
id: build id: build
shell: bash shell: bash
env:
DOCKER_BUILDKIT: "1"
run: | run: |
BUILD_ARGS_FLAG="" BUILD_ARGS_FLAG=""
if [ -n "${{ inputs.build-args }}" ]; then if [ -n "${{ inputs.build-args }}" ]; then
+1 -1
View File
@@ -53,4 +53,4 @@ jobs:
- **Multi-platform** builds via QEMU (if platforms != linux/amd64) - **Multi-platform** builds via QEMU (if platforms != linux/amd64)
- **Layer caching** via local buildx cache - **Layer caching** via local buildx cache
- **Git metadata** — auto-adds `date-SHA` tag + git tag if on a tag ref - **Git metadata** — auto-adds `date-SHA` tag + git tag if on a tag ref
- **`DOCKER_HOST`** — auto-configured for Gitea Actions (`tcp://docker.local:2375`) - Uses the job-mounted Docker socket (`unix:///var/run/docker.sock`) provided by the Gitea runner