我已经检查了有关此错误的上一篇文章。仍然没有得到解决方案的工作。这是我的 bash 脚本。有人可以帮我解决这个问题吗?我已经使用https://www.shellcheck.net/查看任何错误。我没有找到。
错误:
Dockerfunctiontest.sh: 2: Dockerfunctiontest.sh: Syntax error: "(" unexpected
Run Code Online (Sandbox Code Playgroud)
脚本:
#!/bin/bash
function BuildSimpleContainer ()
{
docker search mariadb
docker pull mariadb:latest
docker run --name mariadbtestfour -e MYSQL_ROOT_PASSWORD=mypass -d mariadb --log-bin --binlog-format=MIXED
docker exec -it mariadbtest bash
apt-get -qq update
apt-get -qq -y install curl
apt-get -qq -y install wget
apt-get update
apt-get install apt-transport-https
apt-get update
cd /home
mkdir mdsd
cd mdsd/
wget '<blob url to pfx file>'
echo "certififcate Downloaded"
wget '<blob url file1>'
echo …Run Code Online (Sandbox Code Playgroud)