run.sh 256 B

12345678
  1. #!/bin/bash
  2. image="$1"
  3. dirTest="$(dirname "$(readlink -f "$BASH_SOURCE")")"
  4. dirContainer='/usr/src/hello-world'
  5. docker run --rm -v "$dirTest":"$dirContainer":ro -w "$dirContainer" "$image" sh -c 'go build -o /hello-world hello-world.go && /hello-world'