Added measures to ignore docker credential store #72

Merged
khwezi merged 1 commits from test into main 2026-03-14 10:50:27 +02:00
Showing only changes of commit 1917a60867 - Show all commits

View File

@@ -133,10 +133,17 @@ steps:
from_secret: ssh_prod_host from_secret: ssh_prod_host
settings: settings:
script: script:
- docker pull khwezi/webapitest:latest # 1. Create a directory for a temporary docker config
- docker stop webapi 2>NUL || echo "Container not running" - mkdir -p C:\Temp\docker-config
- docker rm webapi 2>NUL || echo "Container not found"
- docker run -d --name webapi --restart unless-stopped -e ASPNETCORE_ENVIRONMENT=Production -p 4001:8081 khwezi/webapitest:latest # 2. Force Docker to use an empty (no-op) credential store
- echo '{"credsStore": ""}' > C:\Temp\docker-config\config.json
# 3. Run all docker commands pointing to this config
- docker --config C:\Temp\docker-config pull khwezi/webapitest:latest
- docker --config C:\Temp\docker-config stop webapi 2>NUL || echo "Container not running"
- docker --config C:\Temp\docker-config rm webapi 2>NUL || echo "Container not found"
- docker --config C:\Temp\docker-config run -d --name webapi --restart unless-stopped -e ASPNETCORE_ENVIRONMENT=Production -p 4001:8081 khwezi/webapitest:latest
when: when:
event: event:
- promote - promote