Skip to content

Instantly share code, notes, and snippets.

@benwilcock
Last active July 30, 2020 09:33
Show Gist options
  • Save benwilcock/bd61b6d60db743260e10947c8d4ccecd to your computer and use it in GitHub Desktop.
Save benwilcock/bd61b6d60db743260e10947c8d4ccecd to your computer and use it in GitHub Desktop.
Quickly run 'Hello World' samples on Docker.
#!/bin/bash
# Python 3
docker run --rm -d -ePORT=8080 -p8082:8080 --name python-sample benwilcock/python-sample:1.0.0
# Spring Boot 2.3
docker run --rm -d -p8083:8080 --name spring-sample benwilcock/spring-sample:1.0.0
# Quarkus 1.6
docker run --rm -d -p8084:8080 --name quarkus-sample benwilcock/quarkus-sample:1.0.0
# Quarkus on GraalVM 20.1
docker run --rm -d -p8085:8080 --name graalvm-sample benwilcock/graalvm-sample:1.0.0
echo "Sleeping for 5..."
sleep 5
echo "Trying the endpoints..."
http :8082
http :8083/hello
http :8084/hello
http :8085/hello
# Now open `docker stats' to see overheads etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment