diff --git a/Dockerfile b/Dockerfile index f79df62a..582d5bd0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,10 @@ LABEL MAINTAINER="https://casdoor.org/" COPY --from=BACK /go/src/casdoor/ ./ COPY --from=BACK /usr/bin/wait-for-it ./ COPY --from=FRONT /web/build /web/build -CMD chmod 777 /tmp && service mariadb start&& mysqladmin -u root password ${MYSQL_ROOT_PASSWORD} &&./wait-for-it localhost:3306 -- ./server +CMD chmod 777 /tmp && service mariadb start&&\ +if [ "${MYSQL_ROOT_PASSWORD}" = "" ] ;then MYSQL_ROOT_PASSWORD=123456 ; fi&&\ +mysqladmin -u root password ${MYSQL_ROOT_PASSWORD} &&\ +./wait-for-it localhost:3306 -- ./server FROM alpine:latest