Added measures to ignore docker credential store #72
15
.drone.yml
15
.drone.yml
@@ -133,10 +133,17 @@ steps:
|
||||
from_secret: ssh_prod_host
|
||||
settings:
|
||||
script:
|
||||
- docker pull khwezi/webapitest:latest
|
||||
- docker stop webapi 2>NUL || echo "Container not running"
|
||||
- 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
|
||||
# 1. Create a directory for a temporary docker config
|
||||
- mkdir -p C:\Temp\docker-config
|
||||
|
||||
# 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:
|
||||
event:
|
||||
- promote
|
||||
|
||||
Reference in New Issue
Block a user