From f0759a308438d4c02b8bcd456de7a11712c989d2 Mon Sep 17 00:00:00 2001 From: Guohan Lu Date: Fri, 1 Dec 2017 07:04:01 +0000 Subject: [PATCH] [build]: start docker service if not already started docker start fails when docker service is already started --- slave.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slave.mk b/slave.mk index 71cee41e3d0a..e3ffc7e91ce7 100644 --- a/slave.mk +++ b/slave.mk @@ -336,7 +336,7 @@ $(SONIC_INSTALL_WHEELS) : $(PYTHON_WHEELS_PATH)/%-install : .platform $$(addsuff # start docker daemon docker-start : - @sudo service docker start &> /dev/null && sleep 1 + @sudo service docker status &> /dev/null || ( sudo service docker start &> /dev/null && sleep 1 ) # targets for building simple docker images that do not depend on any debian packages $(addprefix $(TARGET_PATH)/, $(SONIC_SIMPLE_DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform docker-start $$(addsuffix -load,$$(addprefix $(TARGET_PATH)/,$$($$*.gz_LOAD_DOCKERS)))