Skip to content

Commit

Permalink
[docker script] skip docker mount point checking for database contain…
Browse files Browse the repository at this point in the history
…er (sonic-net#2683)

database container doesn't mount hwsku folder.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
  • Loading branch information
yxieca authored and tiantianlv committed Apr 10, 2019
1 parent c733b31 commit fa32c3a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa32c3a

Please sign in to comment.