From 9195c0ca98ef491e94d687f430dc2b39c3e88713 Mon Sep 17 00:00:00 2001 From: aovantsev Date: Thu, 2 Oct 2025 23:42:25 +0300 Subject: [PATCH] change localhost to host.docker.internal --- .drone.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index c6e4c80..0e9f378 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,23 +10,23 @@ steps: path: /var/run/docker.sock commands: # Build the Docker image - - docker build -t localhost:5000/counter:latest . + - docker build -t host.docker.internal:5000/counter:latest . # Push to local registry - - docker push localhost:5000/counter:latest + - docker push host.docker.internal:5000/counter:latest # Stop and remove existing container if it exists - docker stop counter-app || true - docker rm counter-app || true # Run the new container - - docker run -d --name counter-app -p 8080:8080 localhost:5000/counter:latest + - docker run -d --name counter-app -p 8080:8080 host.docker.internal:5000/counter:latest # Wait a moment for the container to start - sleep 5 # Test the API - - curl -f http://localhost:8080/ || exit 1 + - curl -f http://host.docker.internal:8080/ || exit 1 volumes: - name: dockersock