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 (#2683)

database container doesn't mount hwsku folder.

Signed-off-by: Ying Xie <[email protected]>
  • Loading branch information
yxieca authored Mar 20, 2019
1 parent 2ee36c7 commit 698b248
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 698b248

Please sign in to comment.