From cdde16b6f196a8e4fcab82d4f4c0fc82dc619b5e Mon Sep 17 00:00:00 2001 From: Daniel Oh Date: Fri, 19 Apr 2024 13:04:31 -0400 Subject: [PATCH] Add quarkus cli --- Dockerfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index df7ff44..70251be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,20 +10,22 @@ ENV MVN_VERSION=3.9.6 ENV GRAALVM_HOME="/usr/local/mandrel-java21-${MANDREL_VERSION}" ENV PATH="/usr/local/maven/apache-maven-${MVN_VERSION}/bin:${PATH}" ENV JAVA_HOME="/usr/lib/jvm/java-21-openjdk" +ENV QUARKUS_VERSION="3.9.4" +ENV JBANG_DIR="/usr/local/jbang" USER root RUN wget -O /tmp/openjdk-21.0.2.tar.gz https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-x64_bin.tar.gz && tar -xvzf /tmp/openjdk-21.0.2.tar.gz && rm -rf /tmp/openjdk-21.0.2.tar.gz && mv jdk-21.0.2 /tmp/java-21-openjdk && sudo mv /tmp/java-21-openjdk /usr/lib/jvm/ && sudo alternatives --install /usr/bin/java java /usr/lib/jvm/java-21-openjdk/bin/java 1 - RUN wget -O /tmp/mvn.tar.gz https://archive.apache.org/dist/maven/maven-3/${MVN_VERSION}/binaries/apache-maven-${MVN_VERSION}-bin.tar.gz && sudo tar -xvzf /tmp/mvn.tar.gz && rm -rf /tmp/mvn.tar.gz && mkdir /usr/local/maven && mv apache-maven-${MVN_VERSION}/ /usr/local/maven/ && alternatives --install /usr/bin/mvn mvn /usr/local/maven/apache-maven-${MVN_VERSION}/bin/mvn 1 - RUN sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && sudo microdnf install -y zlib-devel gcc siege gcc-c++ && sudo curl -Lo /usr/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 && sudo chmod a+x /usr/bin/jq - RUN wget -O /tmp/mandrel.tar.gz https://github.com/graalvm/mandrel/releases/download/mandrel-${MANDREL_VERSION}/mandrel-java21-linux-amd64-${MANDREL_VERSION}.tar.gz && cd /usr/local && sudo tar -xvzf /tmp/mandrel.tar.gz && rm -rf /tmp/mandrel.tar.gz - RUN ln -f -s /usr/lib/jvm/java-21-openjdk/* ${HOME}/.java/current -RUN curl -Ls https://sh.jbang.dev | bash -s - trust add https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/ \ -curl -Ls https://sh.jbang.dev | bash -s - app install --fresh --force quarkus@quarkusio +RUN mkdir -p /usr/local/quarkus-cli/lib && mkdir /usr/local/quarkus-cli/bin +RUN wget -O /tmp/quarkus-cli.tgz https://github.com/quarkusio/quarkus/releases/download/${QUARKUS_VERSION}/quarkus-cli-${QUARKUS_VERSION}.tar.gz && tar -xzf /tmp/quarkus-cli.tgz -C /tmp +RUN cp /tmp/quarkus-cli-${QUARKUS_VERSION}/bin/quarkus /usr/local/quarkus-cli/bin && cp /tmp/quarkus-cli-${QUARKUS_VERSION}/lib/quarkus-cli-${QUARKUS_VERSION}-runner.jar /usr/local/quarkus-cli/lib +RUN chmod +x /usr/local/quarkus-cli/bin/quarkus && cd /usr/local/bin && ln -s ../quarkus-cli/bin/quarkus quarkus +RUN mkdir -p ${JBANG_DIR} && curl -Ls https://sh.jbang.dev | bash -s - app setup +RUN ln -s ${JBANG_DIR}/bin/jbang /usr/local/bin/jbang USER user \ No newline at end of file