Skip to content

Instantly share code, notes, and snippets.

@armandgrillet
Created November 6, 2018 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save armandgrillet/f7bda9ca1c83a2e75c5f75654c8a1293 to your computer and use it in GitHub Desktop.
Save armandgrillet/f7bda9ca1c83a2e75c5f75654c8a1293 to your computer and use it in GitHub Desktop.
MesosCon 2018 - Using and extending the Mesos CLI : Demo 1
# Write a script:
echo "echo Hello World" > hello-world.sh
# Upload the script to your task's container:
$ cat hello-world.sh | mesos task exec -i exec-test bash -c "cat > hello-world.sh"
# Give the fiel executable permissions:
$ mesos task exec exec-test chmod a+x hello-world.sh
# Execute the script inside the container:
$ mesos task exec exec-test ./hello-world.sh
# See what's happening in the task:
$ mesos task exec -it exec-test bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment