You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by li...@apache.org on 2020/10/17 13:57:23 UTC

[incubator-dolphinscheduler] branch dev updated: [Fix][Docker] fix startup.sh variables cannot reference in single quotes. (#3895)

This is an automated email from the ASF dual-hosted git repository.

lidongdai pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 3fdc557  [Fix][Docker] fix startup.sh variables cannot reference in single quotes. (#3895)
3fdc557 is described below

commit 3fdc5576e19b8102ea4f10a714cd3c85b27b2c4e
Author: spring-bu <37...@users.noreply.github.com>
AuthorDate: Sat Oct 17 21:57:16 2020 +0800

    [Fix][Docker] fix startup.sh variables cannot reference in single quotes. (#3895)
    
    * [Fix][Docker] fix startup.sh variables cannot reference in single quotes.(#3894)
    
    Signed-off-by: YoungMan <bu...@gmail.com>
    
    * Update Dockerfile
    
    update the  comment
    and delete the maridb client
    
    Co-authored-by: dailidong <da...@gmail.com>
---
 docker/build/Dockerfile | 2 +-
 docker/build/startup.sh | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/docker/build/Dockerfile b/docker/build/Dockerfile
index 7b0f09c..086deae 100644
--- a/docker/build/Dockerfile
+++ b/docker/build/Dockerfile
@@ -42,7 +42,7 @@ ADD ./apache-dolphinscheduler-incubating-${VERSION}-dolphinscheduler-bin.tar.gz
 RUN mv /opt/apache-dolphinscheduler-incubating-${VERSION}-dolphinscheduler-bin/ /opt/dolphinscheduler/
 ENV DOLPHINSCHEDULER_HOME /opt/dolphinscheduler
 
-#4. install database, if use mysql as your backend database, the `mysql-client` package should be installed
+#4. install database, if use mysql as your backend database, you should append `mysql-client` at the end of the sentence
 RUN apk add --update --no-cache postgresql postgresql-contrib
 
 #5. modify nginx
diff --git a/docker/build/startup.sh b/docker/build/startup.sh
index ea4fbc0..0511788 100644
--- a/docker/build/startup.sh
+++ b/docker/build/startup.sh
@@ -38,13 +38,13 @@ initDatabase() {
     echo "connect ${DATABASE_TYPE} service"
     if [ ${DATABASE_TYPE} = "mysql" ]; then
         v=$(mysql -h${DATABASE_HOST} -P${DATABASE_PORT} -u${DATABASE_USERNAME} --password=${DATABASE_PASSWORD} -D ${DATABASE_DATABASE} -e "select 1" 2>&1)
-        if [ "$(echo '${v}' | grep 'ERROR' | wc -l)" -eq 1 ]; then
+        if [ "$(echo ${v} | grep 'ERROR' | wc -l)" -eq 1 ]; then
             echo "Error: Can't connect to database...${v}"
             exit 1
         fi
     else
         v=$(sudo -u postgres PGPASSWORD=${DATABASE_PASSWORD} psql -h ${DATABASE_HOST} -p ${DATABASE_PORT} -U ${DATABASE_USERNAME} -d ${DATABASE_DATABASE} -tAc "select 1")
-        if [ "$(echo '${v}' | grep 'FATAL' | wc -l)" -eq 1 ]; then
+        if [ "$(echo ${v} | grep 'FATAL' | wc -l)" -eq 1 ]; then
             echo "Error: Can't connect to database...${v}"
             exit 1
         fi