The Docker publishing method provides many conveniences for implementing DevOps (automated operation and maintenance, which requires configuring code management tools such as Git hooks to implement a series of event controls such as submission, compilation, packaging, and release), and can be well coordinated with Shell scripts. Docker images can be obtained through automatic compilation or by importing images. The title of this article is: Shell script builds Docker for semi-automatic compilation, packaging and release, because I haven’t yet associated it with code management. Shell script different implementationsImport image method (image file rtvsweb-publish.tar): Build and release method (built by Dockerfile): Shell Docker build release script tool core install.sh #!/bin/bash ##file:rtvs.sh ##company:cvnavi.com ##author:Pengjunlin echo "Currently executed file......$0" ####################################Variable definition################################# DOCKER_IMAGE_IS_MATCH_TAR_FILE="false" DOCKER_RTVSWEB_CONTAINER_NAME="rtvsweb-publish" DOCKER_RTVSWEB_NEW_VERSION="" DOCKER_RTVSWEB_FIRST_VERSION=1 DOCKER_RTVSWEB_SECOND_VERSION=0 DOCKER_RTVSWEB_THIRD_VERSION=0 DOCKER_RTVSWEB_VERSION_TAG="" DOCKER_CONTAINER_TEMP_HOST="" DB_REDIS_CONNECTION_STRING="" DB_MYSQL_CONNECTION_STRING="" DB_MYSQL_HOST="" MASTER_LAN_IP="" SYSTEM_ALLOW_TO_SET="false" #####################################Function Definition######################################### function init_files() { # Create rtvs directory if [[ ! -d "/usr/local/rtvs" ]]; then echo "Create container mapping path.... /usr/local/rtvs" mkdir /usr/local/rtvs fi # Copy VersionConfig.xml (make a full copy for the first time, if there are any changes, you need to modify it manually) if [[ -f "./VersionConfig.xml" ]]; then if [[ ! -f "/usr/local/rtvs/VersionConfig.xml" ]]; then echo "Copy an XML configuration file: ./VersionConfig.xml /usr/local/rtvs/VersionConfig.xml" cp VersionConfig.xml /usr/local/rtvs/VersionConfig.xml fi else echo "Missing ./VersionConfig.xml file... Exit installation!" exit fi # Copy SettingConfig.xml (make a complete copy for the first time, if there are any changes, you need to modify it manually) if [[ -f "./SettingConfig.xml" ]]; then if [[ ! -f "/usr/local/rtvs/SettingConfig.xml" ]]; then echo "Copy an XML configuration file: ./SettingConfig.xml /usr/local/rtvs/SettingConfig.xml" cp SettingConfig.xml /usr/local/rtvs/SettingConfig.xml fi else echo "Missing ./SettingConfig.xml file... Exited installation!" exit fi # Copy log4.config (make a full copy for the first time, if there are any changes, you need to modify it manually) if [[ -f "./log4.config" ]]; then if [[ ! -f "/usr/local/rtvs/log4.config" ]]; then echo "Copy a log configuration file: ./log4.config /usr/local/rtvs/log4.config" cp log4.config /usr/local/rtvs/log4.config fi else echo "Missing ./log4.config file... Exit installation!" exit fi } function mysql_create_table() { if [[ -f "./mysql_create_table.sh" ]]; then echo "Database script assignment permissions..." # Add permissions to the executable file chmod a+x mysql_create_table.sh else echo "Missing ./mysql_create_table.sh file... Exited installation!" exit fi # Execute mysql database table creation ./mysql_create_table.sh if [[ $? -eq 0 ]]; then echo "./mysql_docker_install.sh execution completed!" else exit fi } function docker_install() { echo "Check Docker..." docker -v if [ $? -eq 0 ]; then echo "Checked that Docker is installed!" else echo "Install docker environment..." curl -sSL https://get.daocloud.io/docker | sh echo "Install docker environment...installation completed!" fi # Create a public network == bridge mode #docker network create share_network } function mysql_install(){ install_type=$1 if [[ "$install_type" == "by_local_mysql_installer" ]]; then #statements echo "Wget local download and installation is not supported yet, exited!" exit 1 fi if [[ "$install_type" == "by_docker_mysql_installer" ]]; then #statements docker_mysql_install fi if [[ "$install_type" == "by_smart_installer" ]]; then #statements if [[ `netstat -lanp|grep tcp|grep 3306|wc -l` == 1 ]]; then echo "MySQL has been installed locally!" # Print the mysql version echo "mysql version detected:" mysql --version # Execute the script to create the Mysql database mysql_create_table if [[ $? -eq 0 ]]; then echo "Local MySQL script initialization completed!" else echo "Failed to initialize local MySQL script!" exit 1 fi DB_MYSQL_HOST="localhost" else docker_mysql_install fi fi } function docker_mysql_install(){ echo "Install Docker Mysql environment..." if [[ -f "./docker_mysql_install.sh" ]]; then if [[ -f "./docker_mysql_create_table.sh" ]]; then echo "Copy a container execution file: ./docker_mysql_create_table.sh /usr/local/docker_mysql_create_table.sh" cp docker_mysql_create_table.sh /usr/local/docker_mysql_create_table.sh else echo "Missing ./docker_mysql_create_table.sh file... Exited installation!" exit 1 fi # Add permissions to the executable file chmod a+x docker_mysql_install.sh # Install MySQL using Docker ./docker_mysql_install.sh if [[ $? -eq 0 ]]; then echo "./docker_mysql_install.sh execution completed!" # Sleep for 10 seconds echo "Sleep for 10 seconds, waiting for Docker to complete..." sleep 10s # Test printing mysql information print_docker_mysql_info else echo "An error occurred during the execution of ./docker_mysql_install.sh, and the installation has been exited!" exit 1 fi else echo "Missing ./docker_mysql_install.sh file... Exited installation!" exit 1 fi } function docker_container_ip() { DOCKER_CONTAINER_TEMP_HOST=` docker inspect --format '{{ .NetworkSettings.IPAddress }}' $1` } function init_docker_master_ip(){ out=0 for i in `ip a |grep inet[^6]|grep -E -o '([0-9]{1,3}\.){3}[0-9]{1,3}'`; do OLD_IFS="$IFS" IFS="." arr=($i) IFS="$OLD_IFS" for s in ${arr[@]} ;do if [[ $s -eq "192" ]]; then echo "$i" MASTER_LAN_IP=$i out=1 break fi done if [[ $out -eq 1 ]]; then break fi done } function print_docker_mysql_info() { echo "Script executes Mysql information verification:..." if [[ -f "./docker_mysql_validator.sh" ]]; then echo "Copy a container execution file: ./docker_mysql_validator.sh /usr/local/docker_mysql_validator.sh" cp docker_mysql_validator.sh /usr/local/docker_mysql_validator.sh else echo "Missing ./docker_mysql_validator.sh file... Exited installation!" exit fi # Map the copy file path to the docker container docker cp /usr/local/docker_mysql_validator.sh mysql5.7:/usr/local/docker_mysql_validator.sh docker exec -it mysql5.7 /bin/bash -c "sh /usr/local/docker_mysql_validator.sh" if [[ $? -eq 0 ]]; then echo "./docker_mysql_validator.sh execution completed!" echo "MySQL container Host:" docker_container_ip mysql5.7 echo "Current mysql5.7 instance IP=$DOCKER_CONTAINER_TEMP_HOST" #echo "MySQL container network related information:" #docker network inspect share_network #echo "MySQL container link related information:" #cat /etc/hosts else echo "An error occurred during the execution of ./docker_mysql_validator.sh, and the installation has been exited!" exit fi #link Access method DB_MYSQL_HOST="mysql5.7" } function destroy_docker_service() { # Stop the container for i in [ `docker ps ` ]; do if [[ "$i" == "rtvsweb-publish" ]]; then echo "Attempting to stop $DOCKER_RTVSWEB_CONTAINER_NAME container..." docker stop $DOCKER_RTVSWEB_CONTAINER_NAME fi done # Delete container for i in [ `docker ps -a` ]; do if [[ "$i" == "rtvsweb-publish" ]]; then echo "Attempting to delete $DOCKER_RTVSWEB_CONTAINER_NAME container..." docker rm $DOCKER_RTVSWEB_CONTAINER_NAME fi done } function docker_build_image() { #Clean up the container (keep the image of the historical build) destory_docker_service if [[ $? -eq 0 ]]; then echo "Application service container and image have been processed, configuration files have been copied!" else exit 1 fi echo "Docker image build......cmd:(docker build -t rtvsweb:$DOCKER_RTVSWEB_NEW_VERSION .)" docker build -t rtvsweb:$DOCKER_RTVSWEB_NEW_VERSION . # Determine whether there is an image, and create a corresponding container instance if it exists for i in [ `docker images` ]; do #statements if [[ "$i" == "$DOCKER_RTVSWEB_NEW_VERSION" ]]; then DOCKER_IMAGE_IS_MATCH_TAR_FILE="true" echo "The latest build image has been found!" run_docker_service_image break fi done if [[ $DOCKER_IMAGE_IS_MATCH_TAR_FILE == "false" ]]; then echo "Building image does not match the latest version, exiting installation!" exit 1 fi echo "List of docker images after building:" docker images echo "List of currently running Docker container instances:" docker ps } function run_docker_service_image() { echo "Starting docker service container..." : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : if [[ $DB_MYSQL_HOST == "mysql5.7" ]]; then # ===link link mode echo "rtvsweb--Container operation---Link mode" docker run -it --name $DOCKER_RTVSWEB_CONTAINER_NAME --privileged=true --link mysql5.7:mysql5.7 -v /usr/local/rtvs:/MyData -e MyDataPath=/MyData -p 38067:80 -p 44383:443 -p 18000:18000 -p 18002:18002 -p 19700-19719:19700-19719 -p 30888-30889:30888-30889 -d rtvsweb:$DOCKER_RTVSWEB_NEW_VERSION else # ===Normal mode echo "rtvsweb--Container operation---Normal mode" docker run -it --name $DOCKER_RTVSWEB_CONTAINER_NAME --privileged=true -v /usr/local/rtvs:/MyData -e MyDataPath=/MyData -p 38067:80 -p 44383:443 -p 18000:18000 -p 18002:18002 -p 19700-19719:19700-19719 -p 30888-30889:30888-30889 -d rtvsweb:$DOCKER_RTVSWEB_NEW_VERSION fi } ####################Tools and process customization################################# function editXml() { val=`echo ${@:3}` echo "Modifying XML file: $1...." echo "Modifying XML file: [0]=$1, [1]=$2, [2]=$val" echo "XML file $2 tag value=$val" sed -i "s/<$2>.*<\/$2>/<$2>${val}<\/$2></g" $1 } function init_mysql_conn() { if [[ "$DB_MYSQL_HOST" == "localhost" ]]; then mysql="Database=filecache;Data Source=$MASTER_LAN_IP;port=3366;User Id=rtvsweb;Password=rtvs2018;charset=utf8;pooling=true" sed -i "s/<MysqlConnectionString>.*<\/MysqlConnectionString>/<MysqlConnectionString>$mysql<\/MysqlConnectionString>/g" /usr/local/rtvs/SettingConfig.xml DB_MYSQL_CONNECTION_STRING=`grep -E -o -e '<MysqlConnectionString>.+</MysqlConnectionString>' /usr/local/rtvs/SettingConfig.xml | sed 's/<MysqlConnectionString>//g'|sed 's/<\/MysqlConnectionString>//g'` else mysql="Database=filecache;Data Source=mysql5.7;port=3306;User Id=rtvsweb;Password=rtvs2018;charset=utf8;pooling=true" sed -i "s/<MysqlConnectionString>.*<\/MysqlConnectionString>/<MysqlConnectionString>$mysql<\/MysqlConnectionString>/g" /usr/local/rtvs/SettingConfig.xml DB_MYSQL_CONNECTION_STRING=`grep -E -o -e '<MysqlConnectionString>.+</MysqlConnectionString>' /usr/local/rtvs/SettingConfig.xml | sed 's/<MysqlConnectionString>//g'|sed 's/<\/MysqlConnectionString>//g'` fi } function editSpecificConfig() { init_mysql_conn echo "Get /usr/local/rtvs/SettingConfig.xml information..." cat /usr/local/rtvs/SettingConfig.xml # Determine whether it can be set if [[ "$SYSTEM_ALLOW_TO_SET" == "true" ]]; then read -p ">>>Do you want to modify the Redis configuration connection string? y/n: " ans echo "$ans" if [[ "$ans" == "y" ]]; then read -p "Please enter the Redis configuration connection string:" redis echo "New Redis connection string: $redis" sed -i "s/<RedisExchangeHosts>.*<\/RedisExchangeHosts>/<RedisExchangeHosts>$redis<\/RedisExchangeHosts>/g" /usr/local/rtvs/SettingConfig.xml DB_REDIS_CONNECTION_STRING=`grep -E -o -e '<RedisExchangeHosts>.+</RedisExchangeHosts>' /usr/local/rtvs/SettingConfig.xml | sed 's/<RedisExchangeHosts>//g'|sed 's/<\/RedisExchangeHosts>//g'` echo "Get the modified Redis configuration connection string...RedisExchangeHosts=$DB_REDIS_CONNECTION_STRING" fi read -p ">>>Do you want to modify the Mysql configuration connection string? y/n: " ans echo "$ans" if [[ "$ans" == "y" ]]; then read -p "Please enter the Mysql configuration connection string:" mysql echo "New Mysql connection string: $mysql" sed -i "s/<MysqlConnectionString>.*<\/MysqlConnectionString>/<MysqlConnectionString>$mysql<\/MysqlConnectionString>/g" /usr/local/rtvs/SettingConfig.xml DB_MYSQL_CONNECTION_STRING=`grep -E -o -e '<MysqlConnectionString>.+</MysqlConnectionString>' /usr/local/rtvs/SettingConfig.xml | sed 's/<MysqlConnectionString>//g'|sed 's/<\/MysqlConnectionString>//g'` echo "Get the modified Mysql configuration connection string...MysqlConnectionString=$DB_MYSQL_CONNECTION_STRING" fi fi } function remoteRedisAndMysqlConfig() { echo "Get /usr/local/rtvs/SettingConfig.xml information..." cat /usr/local/rtvs/SettingConfig.xml # Set the Redis connection string read -p "Do you want to modify the Redis configuration connection string? y/n: " ans echo "$ans" if [[ "$ans" == "y" ]]; then read -p "Please enter the Redis connection string:" redis echo "New Redis connection string: $redis" sed -i "s/<RedisExchangeHosts>.*<\/RedisExchangeHosts>/<RedisExchangeHosts>$redis<\/RedisExchangeHosts>/g" /usr/local/rtvs/SettingConfig.xml DB_REDIS_CONNECTION_STRING=`grep -E -o -e '<RedisExchangeHosts>.+</RedisExchangeHosts>' /usr/local/rtvs/SettingConfig.xml | sed 's/<RedisExchangeHosts>//g'|sed 's/<\/RedisExchangeHosts>//g'` echo "Get the modified Redis configuration connection string...RedisExchangeHosts=$DB_REDIS_CONNECTION_STRING" fi read -p "Do you want to modify the Mysql configuration connection string? y/n: " ans echo "$ans" if [[ "$ans" == "y" ]]; then read -p "Please enter the Mysql connection string:" mysql echo "New Mysql connection string: $mysql" sed -i "s/<MysqlConnectionString>.*<\/MysqlConnectionString>/<MysqlConnectionString>$mysql<\/MysqlConnectionString>/g" /usr/local/rtvs/SettingConfig.xml DB_MYSQL_CONNECTION_STRING=`grep -E -o -e '<MysqlConnectionString>.+</MysqlConnectionString>' /usr/local/rtvs/SettingConfig.xml | sed 's/<MysqlConnectionString>//g'|sed 's/<\/MysqlConnectionString>//g'` echo "Get the modified Mysql configuration connection string...MysqlConnectionString=$DB_MYSQL_CONNECTION_STRING" fi } function help() { echo "***********************************************" echo "************ Calling method description************" echo "***********************************************" echo "View the core configuration file: cat ./SettingConfig.xml" echo "Help method description: sh ./install.sh help" echo "Modify Redis and MySQL connection strings: sh ./install.sh editXml [XMLFilePath] [tag] ['value'] " echo "************************************************" echo "************ Quick Custom Installation*************" echo "************************************************" echo "1. Execute local MySQL installation (wget download file installation...time-consuming): sh ./install.sh by_local_mysql_installer" echo "2. Execute Docker Mysql installation: sh ./install.sh by_docker_mysql_installer" echo "3. Smart detection determines the installation method of MySQL (if the local machine already has MySQL, use it directly): sh ./install.sh by_smart_installer" echo "4. Simplified installation only requires providing the Redis and MySQL connection strings (very simple method): sh ./install.sh by_simple_installer" echo "Description:\r The above 4 methods already include the installation of Docker application!" } function completed() { echo "*********************Installation result:*****************" # bridge bridge mode #echo "network instance, share_network related container information:" #docker network inspect share_network version_step=1 # Record the next version number if [[ "$DOCKER_RTVSWEB_VERSION_TAG" == "VersionFirst" ]]; then DOCKER_RTVSWEB_FIRST_VERSION=$((DOCKER_RTVSWEB_FIRST_VERSION+version_step)) sed -i "s/<VersionFirst>.*<\/VersionFirst>/<VersionFirst>$DOCKER_RTVSWEB_FIRST_VERSION<\/VersionFirst>/g" /usr/local/rtvs/VersionConfig.xml sed -i "s/<VersionSecond>.*<\/VersionSecond>/<VersionSecond>0<\/VersionSecond>/g" /usr/local/rtvs/VersionConfig.xml sed -i "s/<VersionThird>.*<\/VersionThird>/<VersionThird>0<\/VersionThird>/g" /usr/local/rtvs/VersionConfig.xml fi if [[ "$DOCKER_RTVSWEB_VERSION_TAG" == "VersionSecond" ]]; then DOCKER_RTVSWEB_SECOND_VERSION=$((DOCKER_RTVSWEB_SECOND_VERSION+version_step)) sed -i "s/<VersionSecond>.*<\/VersionSecond>/<VersionSecond>$DOCKER_RTVSWEB_SECOND_VERSION<\/VersionSecond>/g" /usr/local/rtvs/VersionConfig.xml sed -i "s/<VersionThird>.*<\/VersionThird>/<VersionThird>0<\/VersionThird>/g" /usr/local/rtvs/VersionConfig.xml fi if [[ "$DOCKER_RTVSWEB_VERSION_TAG" == "VersionThird" ]]; then DOCKER_RTVSWEB_THIRD_VERSION=$((DOCKER_RTVSWEB_THIRD_VERSION+version_step)) sed -i "s/<VersionThird>.*<\/VersionThird>/<VersionThird>$DOCKER_RTVSWEB_THIRD_VERSION<\/VersionThird>/g" /usr/local/rtvs/VersionConfig.xml fi VIDEO_CACHE_PATH=`grep -E -o -e '<VideoCachePath>.+</VideoCachePath>' /usr/local/rtvs/SettingConfig.xml | sed 's/<VideoCachePath>//g'|sed 's/<\/VideoCachePath>//g'` DB_REDIS_CONNECTION_STRING=`grep -E -o -e '<RedisExchangeHosts>.+</RedisExchangeHosts>' /usr/local/rtvs/SettingConfig.xml | sed 's/<RedisExchangeHosts>//g'|sed 's/<\/RedisExchangeHosts>//g'` DB_MYSQL_CONNECTION_STRING=`grep -E -o -e '<MysqlConnectionString>.+</MysqlConnectionString>' /usr/local/rtvs/SettingConfig.xml | sed 's/<MysqlConnectionString>//g'|sed 's/<\/MysqlConnectionString>//g'` echo "Redis connection string: $DB_REDIS_CONNECTION_STRING" echo "Mysql connection string: $DB_MYSQL_CONNECTION_STRING" echo "Default video cache directory: $VIDEO_CACHE_PATH" echo "Running container instances:" docker ps echo "The IP address corresponding to the container:" docker_container_ip mysql5.7 if [[ "$DOCKER_CONTAINER_TEMP_HOST" != "" ]]; then echo "mysql5.7 ---------------------$DOCKER_CONTAINER_TEMP_HOST" fi docker_container_ip $DOCKER_RTVSWEB_CONTAINER_NAME echo "$DOCKER_RTVSWEB_CONTAINER_NAME ---------------------$DOCKER_CONTAINER_TEMP_HOST" echo "Verify rtvs access: curl http://cvtsp.com:38067/" echo "*********************Installation completed!*****************" } function version_management() { DOCKER_RTVSWEB_FIRST_VERSION=`grep -E -o -e '<VersionFirst>.+</VersionFirst>' /usr/local/rtvs/VersionConfig.xml | sed 's/<VersionFirst>//g'|sed 's/<\/VersionFirst>//g'` DOCKER_RTVSWEB_SECOND_VERSION=`grep -E -o -e '<VersionSecond>.+</VersionSecond>' /usr/local/rtvs/VersionConfig.xml | sed 's/<VersionSecond>//g'|sed 's/<\/VersionSecond>//g'` DOCKER_RTVSWEB_THIRD_VERSION=`grep -E -o -e '<VersionThird>.+</VersionThird>' /usr/local/rtvs/VersionConfig.xml | sed 's/<VersionThird>//g'|sed 's/<\/VersionThird>//g'` DOCKER_RTVSWEB_VERSION_TAG=`grep -E -o -e '<UpgradeTag>.+</UpgradeTag>' /usr/local/rtvs/VersionConfig.xml | sed 's/<UpgradeTag>//g'|sed 's/<\/UpgradeTag>//g'` DOCKER_RTVSWEB_NEW_VERSION="$DOCKER_RTVSWEB_FIRST_VERSION.$DOCKER_RTVSWEB_SECOND_VERSION.$DOCKER_RTVSWEB_THIRD_VERSION" echo "Current rtvsweb version: $DOCKER_RTVSWEB_NEW_VERSION" echo "Current rtvsweb version upgrade format: $DOCKER_RTVSWEB_VERSION_TAG" } function by_local_mysql_installer() { # Docker installation docker_install # Mysql installation and its script creation mysql_install "by_local_mysql_installer" # Image buildingif [[ $? -eq 0 ]]; then docker_build_image if [[ $? -eq 0 ]]; then echo "Image build successful!" else echo "Image building failed!" exit fi else exit fi # Modify the path and data source used by the imageeditSpecificConfig # Output completed after completion } function by_docker_mysql_installer() { # Docker installation docker_install # Mysql installation and its script creationmysql_install "by_docker_mysql_installer" # Image buildingif [[ $? -eq 0 ]]; then docker_build_image if [[ $? -eq 0 ]]; then echo "Image build successful!" else echo "Image building failed!" exit fi else exit fi # Modify the path and data source used by the imageeditSpecificConfig # Output completed after completion } function by_smart_installer() { # Docker installation docker_install # Mysql installation and its script creation mysql_install "by_smart_installer" # Image buildingif [[ $? -eq 0 ]]; then docker_build_image if [[ $? -eq 0 ]]; then echo "Image build successful!" else echo "Image building failed!" exit fi else exit fi # Modify the path and data source used by the imageeditSpecificConfig # Output completed after completion } function by_simple_installer() { # Docker installation docker_install # Image building docker_build_image if [[ $? -eq 0 ]]; then echo "Image build successful!" else echo "Image building failed!" exit fi # Modify the path and data source remoteRedisAndMysqlConfig used by the image # Output completed after completion } if [[ $# -gt 0 ]]; then echo "Check for required files for installation..." init_files if [[ $? -eq 0 ]]; then echo "The file for installing the Docker service exists, verification passed!" else echo "The file for installing the Docker service is missing, and the installation has been exited!" exit fi echo "rtvsweb version check...." version_management echo "Get the local LAN IP address..." init_docker_master_ip echo "Local IP address....MASTER_LAN_IP=$MASTER_LAN_IP" #statements if [[ "$1" == "by_local_mysql_installer" ]]; then #statements by_local_mysql_installer fi if [[ "$1" == "by_docker_mysql_installer" ]]; then #statements by_docker_mysql_installer fi if [[ "$1" == "by_smart_installer" ]]; then #statements by_smart_installer fi if [[ "$1" == "by_simple_installer" ]]; then #statements by_simple_installer fi if [[ "$1" == "editXml" ]]; then if [[ $# -eq 4 ]]; then #statements editXml $2 $3 $4 else echo "editXml parameter number does not match!" fi fi if [[ "$1" == "help" ]]; then #statements help fi else help fi Overall design implementation ideas1. Docker environment preparation and installation 2. MySQL environment preparation and installation 3. Docker knowledge: build and run 4. Version management of Docker images 5. Network access during tolerance: --link 6. Image packaging history 7. Service operation effect The above is my personal experience. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. If there are any mistakes or incomplete considerations, please feel free to correct me. You may also be interested in:
|
<<: Solve the problem of secure_file_priv null
>>: Some tips on website design
Table of contents 1. Introduction 2. Component De...
Prepare the database (MySQL). If you already have...
I am planning to build my own website, so I took ...
@Font-face basic introduction: @font-face is a CSS...
Five delay methods for MySQL time blind injection...
Table of contents 1. Table self-sorting 2. Paging...
This article shares the installation and activati...
Table of contents Preface Relationships between v...
ElementUI implements a table tree list loading tu...
This article shares the installation tutorial of ...
Songti: SimSun Bold: SimHei Microsoft YaHei: Micr...
1. Add the ul tag in the body first <!-- Unord...
need Configuring DingTalk alarms in Zabbix is s...
background: As a DBA, most of the DDL changes of ...