I have checked the previous post on this error. still did not get the solution working. Here is my bash script. can some one help me figure out the issue . I have used https://www.shellcheck.net/ to see any error. I did not find any.
Error:
Dockerfunctiontest.sh: 2: Dockerfunctiontest.sh: Syntax error: "(" unexpected
script:
#!/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 "file1 Downloaded" wget 'blob url file2' echo "file2 Downloaded" } BuildSimpleContainer
(
shouldn't be there on line 2.sh
, notbash
, and is choking on the function declaration syntax.