run.sh 262 B

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