Skip to content

Instantly share code, notes, and snippets.

@adamatti
Last active October 30, 2020 01:36
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 adamatti/4633a7559647aaf779d60e3aad543b6b to your computer and use it in GitHub Desktop.
Save adamatti/4633a7559647aaf779d60e3aad543b6b to your computer and use it in GitHub Desktop.
Play with Quarkus #quarkus
  • Create project:

mvn io.quarkus:quarkus-maven-plugin:1.9.1.Final:create \
    -DprojectGroupId=adamatti \
    -DprojectArtifactId=sample \
    -DclassName="adamatti.HelloResource" \
    -Dpath="/hello"
  • Run as dev

mvn compile quarkus:dev
  • Compile native image

mvn package -Pnative -Dnative-image.docker-build=true
  • Run inside docker:

docker run --rm -it \
    -p "8080:8080" \
    -v ${PWD}/target/sample-1.0-SNAPSHOT-runner:/app \
    centos \
    /app -Dquarkus.http.host=0.0.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment