up
This commit is contained in:
+8
-11
@@ -54,19 +54,14 @@ jobs:
|
||||
LOCAL_REGISTRY="192.168.253.221:3000"
|
||||
echo "Registry: $LOCAL_REGISTRY"
|
||||
|
||||
# Configure Docker to use HTTP for local registry
|
||||
echo '{
|
||||
"insecure-registries": ["'$LOCAL_REGISTRY'"]
|
||||
}' > $DOCKER_CONFIG/config.json
|
||||
# Note: Docker daemon must be pre-configured for insecure registry
|
||||
# See configure-docker-insecure.md for setup instructions
|
||||
|
||||
# Also configure daemon (if we have permissions)
|
||||
sudo mkdir -p /etc/docker 2>/dev/null || true
|
||||
echo '{
|
||||
"insecure-registries": ["'$LOCAL_REGISTRY'"]
|
||||
}' | sudo tee /etc/docker/daemon.json >/dev/null 2>&1 || echo "Could not update daemon.json (continuing anyway)"
|
||||
sudo systemctl reload docker 2>/dev/null || echo "Could not reload docker daemon (continuing anyway)"
|
||||
echo "Testing registry connectivity..."
|
||||
curl -s "http://$LOCAL_REGISTRY/v2/" && echo "✅ Registry accessible via HTTP" || echo "❌ Registry not accessible"
|
||||
|
||||
# Login to local registry with HTTP
|
||||
# Login to local registry
|
||||
echo "Attempting login to local registry..."
|
||||
echo "${{ secrets.token }}" | docker --config $DOCKER_CONFIG login "$LOCAL_REGISTRY" -u "${{ secrets.username }}" --password-stdin
|
||||
|
||||
# Tag images for local registry
|
||||
@@ -88,6 +83,8 @@ jobs:
|
||||
fi
|
||||
else
|
||||
echo "❌ Local registry push failed"
|
||||
echo "Please run: sudo systemctl restart docker"
|
||||
echo "And configure /etc/docker/daemon.json with insecure-registries"
|
||||
docker images | grep nfoguard
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user