diff --git a/src/docker/Dockerfile-base b/src/docker/Dockerfile-base index c7ab99dddc..afaac2193a 100644 --- a/src/docker/Dockerfile-base +++ b/src/docker/Dockerfile-base @@ -3,6 +3,7 @@ FROM ${PYTHON_BASE_IMAGE} ENV DOCKERIZE_VERSION v0.6.1 ENV SOAR_VERSION 0.11.0 +ENV TZ Asia/Shanghai ARG HTTPS_PROXY="" ARG HTTP_PROXY="" @@ -13,5 +14,3 @@ RUN chmod +x /opt/setup.sh \ && /opt/setup.sh \ && rm -rf /opt/setup.sh -ENV LANG zh_CN.UTF-8 -ENV LC_ALL zh_CN.UTF-8 diff --git a/src/docker/setup.sh b/src/docker/setup.sh index cf3320ea81..edf9a7f969 100644 --- a/src/docker/setup.sh +++ b/src/docker/setup.sh @@ -4,12 +4,14 @@ curl -q -L -o dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz https://git tar -C /opt -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz chmod +x /opt/dockerize mv /opt/dockerize /usr/local/bin/ +rm -rf dockerize* #sqladvisor curl -o sqladvisor -L https://github.com/LeoQuote/SQLAdvisor/releases/download/v2.1/sqladvisor-linux-amd64 chmod +x sqladvisor curl -o sqlparser.tar.gz -L https://github.com/LeoQuote/SQLAdvisor/releases/download/v2.1/sqlparser-linux-amd64.tar.gz tar -xzvf sqlparser.tar.gz mv sqlparser /usr/local/sqlparser +rm -rf sqlparser* #soar curl -L -q https://github.com/XiaoMi/soar/releases/download/$SOAR_VERSION/soar.linux-amd64 -o soar chmod +x soar @@ -21,7 +23,7 @@ curl -L -q -o mongodb-linux-x86_64-rhel70-3.6.20.tgz https://fastdl.mongodb.org/ tar -xvf mongodb-linux-x86_64-rhel70-3.6.20.tgz mv /opt/mongodb-linux-x86_64-rhel70-3.6.20/bin/mongo /usr/local/bin/ chmod +x /usr/local/bin/mongo -rm -rf /opt/mongodb-linux-x86_64-rhel70-3.6.20 +rm -rf /opt/mongodb* #msodbc curl -q -L https://packages.microsoft.com/keys/microsoft.asc -o /etc/apt/trusted.gpg.d/microsoft.asc curl -q -L https://packages.microsoft.com/config/debian/11/prod.list -o /etc/apt/sources.list.d/mssql-release.list @@ -41,8 +43,10 @@ curl -O https://repo.percona.com/apt/percona-release_latest.generic_all.deb apt-get install -yq gnupg2 lsb-release ./percona-release_latest.generic_all.deb apt-get update percona-release setup -y ps-57 -apt-get install -yq percona-toolkit libperconaserverclient20-dev libperconaserverclient20 -apt-get install -yq build-essentials +apt-get install -yq percona-toolkit +percona-release disable ps-57 +apt-get install -yq gcc libmariadb-dev +apt-get clean ln -snf /usr/share/zoneinfo/$TZ /etc/localtime echo $TZ > /etc/timezone chmod +x sqladvisor soar my2sql