Set DOCKER_HOST explicitly in workflow
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 31s
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 31s
- Add env.DOCKER_HOST at workflow level - Use host IP that DIND is exposed on - Ensures all docker commands use TCP connection to DIND - Shows DOCKER_HOST value in logs for debugging 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
41e3e11d05
commit
9da8b3e958
1 changed files with 6 additions and 10 deletions
|
|
@ -5,22 +5,18 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
env:
|
||||||
|
DOCKER_HOST: tcp://172.16.208.4:2375
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Docker (use runner's DOCKER_HOST)
|
- name: Set up Docker
|
||||||
run: |
|
run: |
|
||||||
# The runner should have DOCKER_HOST set
|
echo "DOCKER_HOST: ${DOCKER_HOST}"
|
||||||
echo "DOCKER_HOST from runner: ${DOCKER_HOST:-not set}"
|
apt-get update -qq && apt-get install -y -qq docker.io
|
||||||
|
|
||||||
# Install docker client if not present
|
|
||||||
if ! command -v docker &> /dev/null; then
|
|
||||||
echo "Installing docker client..."
|
|
||||||
apt-get update -qq && apt-get install -y -qq docker.io
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker version
|
docker version
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue