Merge pull request 'Added measures to ignore docker credential store' (#72) from test into main
Some checks failed
continuous-integration/drone Build encountered an error

Reviewed-on: #72
This commit was merged in pull request #72.
This commit is contained in:
2026-03-14 10:50:26 +02:00

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