diff --git a/files/build_templates/docker_image_ctl.j2 b/files/build_templates/docker_image_ctl.j2 index 1676e4624a8e..c2d227b43522 100644 --- a/files/build_templates/docker_image_ctl.j2 +++ b/files/build_templates/docker_image_ctl.j2 @@ -103,9 +103,17 @@ start() { DOCKERCHECK=`docker inspect --type container {{docker_container_name}} 2>/dev/null` if [ "$?" -eq "0" ]; then + {%- if docker_container_name == "database" %} + DOCKERMOUNT="" + {%- else %} DOCKERMOUNT=`getMountPoint "$DOCKERCHECK"` - if [ "$DOCKERMOUNT" == "$HWSKU" ]; then + {%- endif %} + if [ x"$DOCKERMOUNT" == x"$HWSKU" ]; then + {%- if docker_container_name == "database" %} + echo "Starting existing {{docker_container_name}} container" + {%- else %} echo "Starting existing {{docker_container_name}} container with HWSKU $HWSKU" + {%- endif %} preStartAction docker start {{docker_container_name}} postStartAction