Run this with jbang -Dquarkus.container-image.build=true build quarkus.java
and it builds a docker image.
Requires just jbang 0.43+ installed (java will be downloaded automatically as needed)
//usr/bin/env jbang "$0" "$@" ; exit $? | |
/** | |
* Run this with `jbang -Dquarkus.container-image.build=true build quarkusjib.java` | |
* and it builds a docker image. | |
*/ | |
//DEPS io.quarkus:quarkus-resteasy:1.8.0.CR1 | |
//DEPS io.quarkus:quarkus-container-image-jib:1.8.0.CR1 | |
//JAVA_OPTIONS -Djava.util.logging.manager=org.jboss.logmanager.LogManager | |
//Q:CONFIG quarkus.container-image.name=quarkusjbangdemo | |
import io.quarkus.runtime.Quarkus; | |
import javax.enterprise.context.ApplicationScoped; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
@Path("/hello") | |
@ApplicationScoped | |
public class quarkusjib { | |
@GET | |
public String sayHello() { | |
return "hello from Quarkus with jbang.dev"; | |
} | |
public static void main(String[] args) { | |
Quarkus.run(args); | |
} | |
} |