Merge pull request 'Unified docker commands' (#80) from test into main
Reviewed-on: #80
This commit was merged in pull request #80.
This commit is contained in:
17
.drone.yml
17
.drone.yml
@@ -134,12 +134,17 @@ steps:
|
|||||||
settings:
|
settings:
|
||||||
settings:
|
settings:
|
||||||
script:
|
script:
|
||||||
- powershell -Command "if (!(Test-Path 'C:\Temp\docker-config')) { New-Item -Path 'C:\Temp\docker-config' -ItemType Directory }"
|
- |
|
||||||
- powershell -Command "Set-Content -Path 'C:\Temp\docker-config\config.json' -Value '{\"credsStore\": \"\"}'"
|
powershell -Command "
|
||||||
- powershell -Command "docker --config C:\Temp\docker-config pull khwezi/webapitest:latest"
|
$path = 'C:/Temp/docker-config';
|
||||||
- powershell -Command "docker --config C:\Temp\docker-config stop webapi; exit 0"
|
if (!(Test-Path $path)) { New-Item -Path $path -ItemType Directory -Force | Out-Null };
|
||||||
- powershell -Command "docker --config C:\Temp\docker-config rm webapi; exit 0"
|
$json = '{\"credsStore\": \"\"}';
|
||||||
- powershell -Command "docker --config C:\Temp\docker-config run -d --name webapi --restart unless-stopped -e ASPNETCORE_ENVIRONMENT=Production -p 4001:8081 khwezi/webapitest:latest"
|
$json | Out-File -FilePath \"$path/config.json\" -Encoding ascii;
|
||||||
|
docker --config $path pull khwezi/webapitest:latest;
|
||||||
|
docker --config $path stop webapi 2>$null;
|
||||||
|
docker --config $path rm webapi 2>$null;
|
||||||
|
docker --config $path run -d --name webapi --restart unless-stopped -e ASPNETCORE_ENVIRONMENT=Production -p 4001:8081 khwezi/webapitest:latest;
|
||||||
|
"
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- promote
|
- promote
|
||||||
|
|||||||
Reference in New Issue
Block a user