Merge branch 'main' into main-v5
This commit is contained in:
commit
95e0045418
@ -121,6 +121,15 @@
|
|||||||
"contributions": [
|
"contributions": [
|
||||||
"doc"
|
"doc"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "Shanduur",
|
||||||
|
"name": "Mateusz Urbanek",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/32583062?v=4",
|
||||||
|
"profile": "http://shanduur.github.io",
|
||||||
|
"contributions": [
|
||||||
|
"code"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"contributorsPerLine": 7,
|
"contributorsPerLine": 7,
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
[](https://goreportcard.com/report/github.com/rancher/k3d)
|
[](https://goreportcard.com/report/github.com/rancher/k3d)
|
||||||
|
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||||
[](#contributors-)
|
[](#contributors-)
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||||
[](code_of_conduct.md)
|
[](code_of_conduct.md)
|
||||||
|
|
||||||
@ -139,6 +139,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|||||||
<td align="center"><a href="http://wsl.dev"><img src="https://avatars2.githubusercontent.com/u/905874?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nuno do Carmo</b></sub></a><br /><a href="#content-nunix" title="Content">🖋</a> <a href="#tutorial-nunix" title="Tutorials">✅</a> <a href="#question-nunix" title="Answering Questions">💬</a></td>
|
<td align="center"><a href="http://wsl.dev"><img src="https://avatars2.githubusercontent.com/u/905874?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nuno do Carmo</b></sub></a><br /><a href="#content-nunix" title="Content">🖋</a> <a href="#tutorial-nunix" title="Tutorials">✅</a> <a href="#question-nunix" title="Answering Questions">💬</a></td>
|
||||||
<td align="center"><a href="https://github.com/erwinkersten"><img src="https://avatars0.githubusercontent.com/u/4391121?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Erwin Kersten</b></sub></a><br /><a href="https://github.com/rancher/k3d/commits?author=erwinkersten" title="Documentation">📖</a></td>
|
<td align="center"><a href="https://github.com/erwinkersten"><img src="https://avatars0.githubusercontent.com/u/4391121?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Erwin Kersten</b></sub></a><br /><a href="https://github.com/rancher/k3d/commits?author=erwinkersten" title="Documentation">📖</a></td>
|
||||||
<td align="center"><a href="http://www.alexsears.com"><img src="https://avatars.githubusercontent.com/u/3712883?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alex Sears</b></sub></a><br /><a href="https://github.com/rancher/k3d/commits?author=searsaw" title="Documentation">📖</a></td>
|
<td align="center"><a href="http://www.alexsears.com"><img src="https://avatars.githubusercontent.com/u/3712883?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alex Sears</b></sub></a><br /><a href="https://github.com/rancher/k3d/commits?author=searsaw" title="Documentation">📖</a></td>
|
||||||
|
<td align="center"><a href="http://shanduur.github.io"><img src="https://avatars.githubusercontent.com/u/32583062?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mateusz Urbanek</b></sub></a><br /><a href="https://github.com/rancher/k3d/commits?author=Shanduur" title="Code">💻</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -192,22 +192,31 @@ func executeCheckInContainer(ctx context.Context, image string, cmd []string) (i
|
|||||||
}
|
}
|
||||||
defer docker.Close()
|
defer docker.Close()
|
||||||
|
|
||||||
if err = pullImage(ctx, docker, image); err != nil {
|
// create container
|
||||||
return -1, err
|
var resp container.ContainerCreateCreatedBody
|
||||||
}
|
for {
|
||||||
|
resp, err = docker.ContainerCreate(ctx, &container.Config{
|
||||||
resp, err := docker.ContainerCreate(ctx, &container.Config{
|
Image: image,
|
||||||
Image: image,
|
Cmd: cmd,
|
||||||
Cmd: cmd,
|
Tty: false,
|
||||||
Tty: false,
|
Entrypoint: []string{},
|
||||||
Entrypoint: []string{},
|
}, nil, nil, nil, "")
|
||||||
}, nil, nil, nil, "")
|
if err != nil {
|
||||||
if err != nil {
|
if client.IsErrNotFound(err) {
|
||||||
l.Log().Errorf("Failed to create container from image %s with cmd %s", image, cmd)
|
if err := pullImage(ctx, docker, image); err != nil {
|
||||||
return -1, err
|
l.Log().Errorf("Failed to create container from image %s with cmd %s", image, cmd)
|
||||||
|
return -1, err
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
l.Log().Errorf("Failed to create container from image %s with cmd %s", image, cmd)
|
||||||
|
return -1, err
|
||||||
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = startContainer(ctx, resp.ID); err != nil {
|
if err = startContainer(ctx, resp.ID); err != nil {
|
||||||
|
l.Log().Errorf("Failed to start container from image %s with cmd %s", image, cmd)
|
||||||
return -1, err
|
return -1, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user