1
0
mirror of https://github.com/IceWhaleTech/CasaOS.git synced 2025-07-15 23:54:17 +02:00

fixed bug

This commit is contained in:
link
2021-12-01 16:25:56 +08:00
parent 049090444e
commit 956328da86
9 changed files with 35 additions and 11 deletions

View File

@ -479,15 +479,13 @@ func (ds *dockerService) DockerContainerCreate(imageName string, containerDbId s
if len(m.Restart) > 0 {
rp.Name = m.Restart
}
//fmt.Print(port)
healthTest := []string{}
if len(port) > 0 {
healthTest = []string{"CMD-SHELL", "curl -f http://localhost:" + port + m.Index + " || exit 1"}
}
health := &container.HealthConfig{
Test: healthTest,
//Test: []string{},
Test: healthTest,
StartPeriod: 0,
Retries: 1000,
}