refactor(docker): simplified loop expression
parent
5a5f7f8346
commit
3821ed29fd
|
@ -118,11 +118,7 @@ pub fn build_repo(address string, api_key string, base_image_id string, repo &db
|
||||||
mut data := docker.inspect_container(id) ?
|
mut data := docker.inspect_container(id) ?
|
||||||
|
|
||||||
// This loop waits until the container has stopped, so we can remove it after
|
// This loop waits until the container has stopped, so we can remove it after
|
||||||
for {
|
for data.state.running {
|
||||||
if !data.state.running {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
time.sleep(1 * time.second)
|
time.sleep(1 * time.second)
|
||||||
|
|
||||||
data = docker.inspect_container(id) ?
|
data = docker.inspect_container(id) ?
|
||||||
|
|
Loading…
Reference in New Issue