+}
+docker_run() +{
- docker run -d --name "${image}" "${image}$1"
- docker_stats=$(docker inspect ${image} | grep Running | awk -F ' ' '{print $2}' | tr -d ',')
you can use the following command to get the running status code: docker inspect --format '{{.State.Running}}' ${image}
if you want pring the name either, use: docker inspect --format '{{.Name}} {{.State.Running}}' ${image}
Thanks Luan Shengde
- [ $docker_stats == false ] && {
echo "${image}.run.fail: 1"
return 1
- }
- echo "${image}.run.success: 1"
+}
+docker_test() +{
- fit_repo
- openeuler_ready
- centos_docker
+}
+docker_test
2.23.0